Imported Debian patch 4.0.5-6~numeezy
This commit is contained in:
committed by
Mario Fetka
parent
c44de33144
commit
10dfc9587b
@@ -32,7 +32,7 @@ from ipapython import config
|
||||
from ipapython import ipa_log_manager
|
||||
|
||||
|
||||
class ScriptError(Exception):
|
||||
class ScriptError(StandardError):
|
||||
"""An exception that records an error message and a return value
|
||||
"""
|
||||
def __init__(self, msg='', rval=1):
|
||||
@@ -169,7 +169,7 @@ class AdminTool(object):
|
||||
self.ask_for_options()
|
||||
self.setup_logging()
|
||||
return_value = self.run()
|
||||
except BaseException as exception:
|
||||
except BaseException, exception:
|
||||
traceback = sys.exc_info()[2]
|
||||
error_message, return_value = self.handle_error(exception)
|
||||
if return_value:
|
||||
@@ -291,10 +291,6 @@ class AdminTool(object):
|
||||
self.command_name, type(exception).__name__, exception)
|
||||
if error_message:
|
||||
self.log.error(error_message)
|
||||
message = "The %s command failed." % self.command_name
|
||||
if self.log_file_name:
|
||||
message += " See %s for more information" % self.log_file_name
|
||||
self.log.error(message)
|
||||
|
||||
def log_success(self):
|
||||
self.log.info('The %s command was successful', self.command_name)
|
||||
|
||||
Reference in New Issue
Block a user