mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Use Exception class instead of StandardError
In except clause, use of "," is not recommended (PEP 3110) Signed-off-by: Niranjan Mallapadi <mrniranjan@fedoraproject.org> Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
parent
3c974c157f
commit
7d28230405
@ -32,7 +32,7 @@ from ipapython import config
|
||||
from ipapython import ipa_log_manager
|
||||
|
||||
|
||||
class ScriptError(StandardError):
|
||||
class ScriptError(Exception):
|
||||
"""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, exception:
|
||||
except BaseException as exception:
|
||||
traceback = sys.exc_info()[2]
|
||||
error_message, return_value = self.handle_error(exception)
|
||||
if return_value:
|
||||
|
Loading…
Reference in New Issue
Block a user