From 7d2823040593a4207cfce834a5c6840464fab64b Mon Sep 17 00:00:00 2001 From: Niranjan Mallapadi Date: Wed, 10 Jun 2015 04:19:46 +0530 Subject: Use Exception class instead of StandardError In except clause, use of "," is not recommended (PEP 3110) Signed-off-by: Niranjan Mallapadi Reviewed-By: Martin Basti Reviewed-By: Petr Viktorin --- ipapython/admintool.py | 4 ++-- 1 file 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: -- cgit