dcerpc: disable unbalanced-tuple-unpacking

Disable unbalanced-tuple-unpacking for RuntimeException thrown
by samba since this one should always contain two members.

https://pagure.io/freeipa/issue/6874

Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Laznicka 2017-08-22 13:23:04 +02:00
parent 216d37b7f0
commit 3c616d733b

View File

@ -1275,7 +1275,9 @@ class TrustDomainInstance(object):
self._pipe.DeleteTrustedDomain(self._policy_handle,
res.info_ex.sid)
except RuntimeError as e:
num, message = e.args # pylint: disable=unpacking-non-sequence
# pylint: disable=unbalanced-tuple-unpacking
num, _message = e.args
# pylint: enable=unbalanced-tuple-unpacking
# Ignore anything but access denied (NT_STATUS_ACCESS_DENIED)
if num == -1073741790:
raise access_denied_error