Commit de75062c authored by Craig Citro's avatar Craig Citro

Fix DeprecationWarning: e.message -> e.args[0] for exceptions

parent bd587ae5
...@@ -118,7 +118,7 @@ def parse_command_line(args): ...@@ -118,7 +118,7 @@ def parse_command_line(args):
try: try:
options.compiler_directives = Options.parse_directive_list(pop_arg(), relaxed_bool=True) options.compiler_directives = Options.parse_directive_list(pop_arg(), relaxed_bool=True)
except ValueError, e: except ValueError, e:
sys.stderr.write("Error in compiler directive: %s\n" % e.message) sys.stderr.write("Error in compiler directive: %s\n" % e.args[0])
sys.exit(1) sys.exit(1)
else: else:
sys.stderr.write("Unknown compiler flag: %s\n" % option) sys.stderr.write("Unknown compiler flag: %s\n" % option)
......
...@@ -362,7 +362,7 @@ class Scope(object): ...@@ -362,7 +362,7 @@ class Scope(object):
type = PyrexTypes.create_typedef_type(name, base_type, cname, type = PyrexTypes.create_typedef_type(name, base_type, cname,
(visibility == 'extern')) (visibility == 'extern'))
except ValueError, e: except ValueError, e:
error(pos, e.message) error(pos, e.args[0])
type = PyrexTypes.error_type type = PyrexTypes.error_type
entry = self.declare_type(name, type, pos, cname, visibility) entry = self.declare_type(name, type, pos, cname, visibility)
type.qualified_name = entry.qualified_name type.qualified_name = entry.qualified_name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment