diff options
author | Niranjan Mallapadi <[email protected]> | 2015-06-10 04:19:46 +0530 |
---|---|---|
committer | Martin Basti <[email protected]> | 2015-07-27 18:01:34 +0200 |
commit | 7d2823040593a4207cfce834a5c6840464fab64b (patch) | |
tree | a9a7bc0bc3dbd0044639c757dc657ee3a87eee0d | |
parent | 3c974c157f332bd8f4db48eba52d2b760c0c1e77 (diff) | |
download | freeipa-7d2823040593a4207cfce834a5c6840464fab64b.tar.gz freeipa-7d2823040593a4207cfce834a5c6840464fab64b.tar.xz freeipa-7d2823040593a4207cfce834a5c6840464fab64b.zip |
Use Exception class instead of StandardError
In except clause, use of "," is not recommended (PEP 3110)
Signed-off-by: Niranjan Mallapadi <[email protected]>
Reviewed-By: Martin Basti <[email protected]>
Reviewed-By: Petr Viktorin <[email protected]>
-rw-r--r-- | ipapython/admintool.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipapython/admintool.py b/ipapython/admintool.py index d55bd1849..5aa1c19bb 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: |