Skip to content

Commit

Permalink
Merge pull request #64 from pinotree/errno
Browse files Browse the repository at this point in the history
Do not hardcode errno values
  • Loading branch information
dirk-thomas authored Aug 13, 2016
2 parents 81b66fe + 1cf7287 commit d8853e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/genmsg/template_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import sys
import os
import em
import errno
import genmsg.command_line
import genmsg.msgs
import genmsg.msg_loader
Expand Down Expand Up @@ -139,7 +140,7 @@ def generate_from_file(input_file, package_name, output_dir, template_dir, inclu
try:
os.makedirs(output_dir)
except OSError as e:
if e.errno != 17: # ignore file exists error
if e.errno != errno.EEXIST: # ignore file exists error
raise

# Parse include path dictionary
Expand Down

0 comments on commit d8853e6

Please sign in to comment.