summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiranjan Mallapadi <mrniranjan@fedoraproject.org>2015-06-10 04:19:46 +0530
committerMartin Basti <mbasti@redhat.com>2015-07-27 18:01:34 +0200
commit7d2823040593a4207cfce834a5c6840464fab64b (patch)
treea9a7bc0bc3dbd0044639c757dc657ee3a87eee0d
parent3c974c157f332bd8f4db48eba52d2b760c0c1e77 (diff)
downloadfreeipa-7d2823040593a4207cfce834a5c6840464fab64b.zip
freeipa-7d2823040593a4207cfce834a5c6840464fab64b.tar.gz
freeipa-7d2823040593a4207cfce834a5c6840464fab64b.tar.xz
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>
-rw-r--r--ipapython/admintool.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipapython/admintool.py b/ipapython/admintool.py
index d55bd18..5aa1c19 100644
--- a/ipapython/admintool.py
+++ b/ipapython/admintool.py
@@ -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: