diff options
author | Martin Basti <mbasti@redhat.com> | 2016-03-22 16:39:39 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-03-22 17:33:02 +0100 |
commit | d1e29fe60e75a6f40a780eb45e86f2ed87d00e5a (patch) | |
tree | 7e9e2961e5bd192c98e08ee896a2e76cdea4389d /ipalib | |
parent | c2042900382190b1c9d7a44bd719cacd804749b3 (diff) | |
download | freeipa-d1e29fe60e75a6f40a780eb45e86f2ed87d00e5a.tar.gz freeipa-d1e29fe60e75a6f40a780eb45e86f2ed87d00e5a.tar.xz freeipa-d1e29fe60e75a6f40a780eb45e86f2ed87d00e5a.zip |
Fix: catch Exception instead of more specific exception types
Regression caused by commit 491447cc5ab8c5eff2be57d609201cefb79f7053,
ValueErrori and AttributeError are too much specific for these cases, multiple types of
exception can be raised.
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/stageuser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/plugins/stageuser.py b/ipalib/plugins/stageuser.py index 510b66c43..9b40adf1c 100644 --- a/ipalib/plugins/stageuser.py +++ b/ipalib/plugins/stageuser.py @@ -565,7 +565,7 @@ class stageuser_activate(LDAPQuery): try: v.decode('utf-8') self.log.debug("merge: %s:%r wiped" % (attr, v)) - except ValueError: + except Exception: self.log.debug("merge %s: [no_print %s]" % (attr, v.__class__.__name__)) if isinstance(entry_to[attr], (list, tuple)): # multi value attribute @@ -581,7 +581,7 @@ class stageuser_activate(LDAPQuery): try: v.decode('utf-8') self.log.debug("Add: %s:%r" % (attr, v)) - except ValueError: + except Exception: self.log.debug("Add %s: [no_print %s]" % (attr, v.__class__.__name__)) if isinstance(entry_to[attr], (list, tuple)): |