From 3b0db70c64362d0d21fe5ba4834f1b267accfcd3 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 24 Apr 2010 17:07:55 +0200 Subject: [PATCH] do not call the deprecated attribute Exception.message --- weboob/frontends/weboobcfg/application.py | 2 +- weboob/tools/application/base.py | 2 +- weboob/tools/application/console.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/weboob/frontends/weboobcfg/application.py b/weboob/frontends/weboobcfg/application.py index d1cebde7..4d0d50a3 100644 --- a/weboob/frontends/weboobcfg/application.py +++ b/weboob/frontends/weboobcfg/application.py @@ -112,7 +112,7 @@ class WeboobCfg(ConsoleApplication): try: self.weboob.backends_config.add_backend(name, type, params) except ConfigParser.DuplicateSectionError, e: - print >>sys.stderr, 'Error: %s (filename=%s)' % (e.message, self.weboob.backends_config.confpath) + print >>sys.stderr, 'Error: %s (filename=%s)' % (e, self.weboob.backends_config.confpath) return 1 @ConsoleApplication.command('List backends') diff --git a/weboob/tools/application/base.py b/weboob/tools/application/base.py index 26b471ff..843138bc 100644 --- a/weboob/tools/application/base.py +++ b/weboob/tools/application/base.py @@ -161,4 +161,4 @@ class BaseApplication(object): except KeyboardInterrupt: print 'Program killed by SIGINT' except ConfigError, e: - print 'Configuration error: %s' % e.message + print 'Configuration error: %s' % e diff --git a/weboob/tools/application/console.py b/weboob/tools/application/console.py index 708f50c0..d4b65b04 100644 --- a/weboob/tools/application/console.py +++ b/weboob/tools/application/console.py @@ -99,7 +99,7 @@ class ConsoleApplication(BaseApplication): try: BaseApplication.__init__(self) except BackendsConfig.WrongPermissions, e: - print >>sys.stderr, 'Error: %s' % e.message + print >>sys.stderr, 'Error: %s' % e sys.exit(1) self.default_output_format = None @@ -203,7 +203,7 @@ class ConsoleApplication(BaseApplication): try: print formatters[output_format].format(command_result) except ImportError, e: - logging.error(u'Could not use formatter "%s". Error: %s' % (output_format, e.message)) + logging.error(u'Could not use formatter "%s". Error: %s' % (output_format, e)) return 0 elif isinstance(command_result, int): return command_result