>From 5c87803bd9d8ac8f79c4c055f7f5f02c198abcde Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 9 Feb 2015 16:46:05 +0100 Subject: [PATCH 01/18] SSSDConfig: Remove unused exception name "except ValueError, e:" was the syntax used for what is normally written as "except ValueError as e:" in modern Python. The old syntax is still supported in python2 for backwards compatibility. This means "except ValueError, KeyError:" is not equivalent to "except (ValueError, KeyError):" but to "except ValueError as KeyError:" and variable with name "KeyError" was not used in exception handler. Resolves: https://fedorahosted.org/sssd/ticket/2017 --- src/config/SSSDConfig/__init__.py.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/SSSDConfig/__init__.py.in b/src/config/SSSDConfig/__init__.py.in index ae00a2b7f9130725a6a766a4cbbba0a53f86dd7a..63d1f177b66c8bf96517044a0b2866555e5f6303 100644 --- a/src/config/SSSDConfig/__init__.py.in +++ b/src/config/SSSDConfig/__init__.py.in @@ -527,7 +527,7 @@ class SSSDConfigSchema(SSSDChangeConf): mandatory, desc, [subtype(split_option[DEFAULT])]) - except ValueError, KeyError: + except ValueError: raise ParsingError else: try: @@ -546,7 +546,7 @@ class SSSDConfigSchema(SSSDChangeConf): mandatory, desc, primarytype(split_option[DEFAULT])) - except ValueError, KeyError: + except ValueError: raise ParsingError elif optionlen > 4: @@ -561,7 +561,7 @@ class SSSDConfigSchema(SSSDChangeConf): else: newvalue = subtype(x) fixed_options.extend([newvalue]) - except ValueError, KeyError: + except ValueError: raise ParsingError else: fixed_options.extend([x]) -- 2.1.0