diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-02-09 16:46:05 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-02-13 18:36:50 +0100 |
commit | d36ff71364db4abc08053d36d392aa602fc5860a (patch) | |
tree | 71f646907787ac1d0bb656cc817ff0dfe9fa5e11 | |
parent | 42563a20baf2f334c01a8f821c5c2d98c208fc84 (diff) | |
download | sssd-d36ff71364db4abc08053d36d392aa602fc5860a.tar.gz sssd-d36ff71364db4abc08053d36d392aa602fc5860a.tar.xz sssd-d36ff71364db4abc08053d36d392aa602fc5860a.zip |
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 <pviktori@redhat.com>
(cherry picked from commit 1ac368d0962ef8cc83dcd642c7fec8b3cba5b6fe)
-rw-r--r-- | src/config/SSSDConfig/__init__.py.in | 6 |
1 files changed, 3 insertions, 3 deletions
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]) |