do not call the deprecated attribute Exception.message
This commit is contained in:
parent
66a460bb60
commit
3b0db70c64
3 changed files with 4 additions and 4 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue