summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2015-07-14 10:50:18 +0200
committerTomas Babej <tbabej@redhat.com>2015-07-14 13:43:50 +0200
commit4677ea29be59effed5c2c3d470451ce0e539132d (patch)
tree83dc597580bace4818675588444280441d7946f8
parentfeb8891dd0cba60acfae16404c6bd99d0ce43075 (diff)
downloadfreeipa-4677ea29be59effed5c2c3d470451ce0e539132d.tar.gz
freeipa-4677ea29be59effed5c2c3d470451ce0e539132d.tar.xz
freeipa-4677ea29be59effed5c2c3d470451ce0e539132d.zip
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>
-rw-r--r--ipalib/plugins/hbactest.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ipalib/plugins/hbactest.py b/ipalib/plugins/hbactest.py
index 068190310..c8dedd367 100644
--- a/ipalib/plugins/hbactest.py
+++ b/ipalib/plugins/hbactest.py
@@ -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: