From de75062c2b28584b6dd06b07ce7381d3fad2e046 Mon Sep 17 00:00:00 2001 From: Craig Citro Date: Wed, 10 Mar 2010 22:31:50 -0800 Subject: [PATCH] Fix DeprecationWarning: e.message -> e.args[0] for exceptions --- Cython/Compiler/CmdLine.py | 2 +- Cython/Compiler/Symtab.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -- 2.26.2