diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-10-17 16:59:06 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2013-10-18 09:21:22 +0900 |
commit | 626b04ef841aa887909f03ea06d4e4ced38c9164 (patch) | |
tree | 963af35f2a367d6794e700e1d52c09dae199096a /rest_example.py | |
parent | 4289ec6b102447520e400cbc7941f2ceff11fe84 (diff) | |
download | pygerrit-626b04ef841aa887909f03ea06d4e4ced38c9164.tar.gz |
Fix pylint error in rest_example.py
pylint says: "redefinition of unused 'HTTPKerberosAuth' from line 34"
Change-Id: Ie2b8cee42bf08eaa0e9bdab1ef5bf2b23ccee7f5
Diffstat (limited to 'rest_example.py')
-rwxr-xr-x | rest_example.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rest_example.py b/rest_example.py index ad762fd..1c278c8 100755 --- a/rest_example.py +++ b/rest_example.py @@ -32,8 +32,9 @@ import sys from requests.auth import HTTPBasicAuth, HTTPDigestAuth try: from requests_kerberos import HTTPKerberosAuth, OPTIONAL + _kerberos_support = True except ImportError: - HTTPKerberosAuth = None + _kerberos_support = False from pygerrit.rest import GerritRestAPI from pygerrit.rest.auth import HTTPDigestAuthFromNetrc, HTTPBasicAuthFromNetrc @@ -72,7 +73,7 @@ def _main(): if not options.gerrit_url: parser.error("Must specify Gerrit URL with --gerrit-url") - if HTTPKerberosAuth and options.kerberos_auth: + if _kerberos_support and options.kerberos_auth: if options.username or options.password \ or options.basic_auth or options.netrc: parser.error("--kerberos-auth may not be used together with " |