From: Craig Citro Date: Thu, 11 Mar 2010 06:31:50 +0000 (-0800) Subject: Fix DeprecationWarning: e.message -> e.args[0] for exceptions X-Git-Tag: 0.13.beta0~323 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=de75062c2b28584b6dd06b07ce7381d3fad2e046;p=cython.git Fix DeprecationWarning: e.message -> e.args[0] for exceptions --- diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index 633d2b7e..66cdc648 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -118,7 +118,7 @@ def parse_command_line(args): try: options.compiler_directives = Options.parse_directive_list(pop_arg(), relaxed_bool=True) 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) else: sys.stderr.write("Unknown compiler flag: %s\n" % option) diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 02f825d1..8282404e 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -362,7 +362,7 @@ class Scope(object): type = PyrexTypes.create_typedef_type(name, base_type, cname, (visibility == 'extern')) except ValueError, e: - error(pos, e.message) + error(pos, e.args[0]) type = PyrexTypes.error_type entry = self.declare_type(name, type, pos, cname, visibility) type.qualified_name = entry.qualified_name