mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Remove tuple unpacking from except clause ipalib/plugins/hbactest.py
Python 3 doesn't support tuple unpacking in except clauses. All implicit tuple unpackings have been replaced with explicit unpacking of e.args. https://fedorahosted.org/freeipa/ticket/5120 Reviewed-By: Tomas Babej <tbabej@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
parent
feb8891dd0
commit
4677ea29be
@ -462,13 +462,14 @@ class hbactest(Command):
|
||||
matched_rules.append(ipa_rule.name)
|
||||
if res == pyhbac.HBAC_EVAL_DENY:
|
||||
notmatched_rules.append(ipa_rule.name)
|
||||
except pyhbac.HbacError as (code, rule_name):
|
||||
except pyhbac.HbacError as e:
|
||||
code, rule_name = e.args
|
||||
if code == pyhbac.HBAC_EVAL_ERROR:
|
||||
error_rules.append(rule_name)
|
||||
self.log.info('Native IPA HBAC rule "%s" parsing error: %s' % \
|
||||
(rule_name, pyhbac.hbac_result_string(code)))
|
||||
except (TypeError, IOError) as (info):
|
||||
self.log.error('Native IPA HBAC module error: %s' % (info))
|
||||
except (TypeError, IOError) as info:
|
||||
self.log.error('Native IPA HBAC module error: %s' % info)
|
||||
|
||||
access_granted = len(matched_rules) > 0
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user