Fix DeprecationWarning: e.message -> e.args[0] for exceptions
authorCraig Citro <craigcitro@gmail.com>
Thu, 11 Mar 2010 06:31:50 +0000 (22:31 -0800)
committerCraig Citro <craigcitro@gmail.com>
Thu, 11 Mar 2010 06:31:50 +0000 (22:31 -0800)
Cython/Compiler/CmdLine.py
Cython/Compiler/Symtab.py

index 633d2b7e0aeb3e2f8458b8898d85eac3e1c50648..66cdc6482194f655dc7c259f487ac967caea9b08 100644 (file)
@@ -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)
index 02f825d1e0cc7e483751424895c0c7f8515703ac..8282404e499a43ac9dd3cb93a115a5a695601758 100644 (file)
@@ -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