From 1ac368d0962ef8cc83dcd642c7fec8b3cba5b6fe Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Mon, 9 Feb 2015 16:46:05 +0100 Subject: 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 Reviewed-by: Petr Viktorin --- src/config/SSSDConfig/__init__.py.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/config') diff --git a/src/config/SSSDConfig/__init__.py.in b/src/config/SSSDConfig/__init__.py.in index ae00a2b7f..63d1f177b 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]) -- cgit