Repository: lens Updated Branches: refs/heads/master c6423ae01 -> fa2df7cb0
LENS-1518: Missing self for ignore cert variable in query.py file Project: http://git-wip-us.apache.org/repos/asf/lens/repo Commit: http://git-wip-us.apache.org/repos/asf/lens/commit/fa2df7cb Tree: http://git-wip-us.apache.org/repos/asf/lens/tree/fa2df7cb Diff: http://git-wip-us.apache.org/repos/asf/lens/diff/fa2df7cb Branch: refs/heads/master Commit: fa2df7cb0d6dd75f886575a0c7143ae6c5c26863 Parents: c6423ae Author: Ankit Kailaswar <[email protected]> Authored: Mon Jun 4 15:15:34 2018 +0530 Committer: Rajat Khandelwal <[email protected]> Committed: Mon Jun 4 15:15:34 2018 +0530 ---------------------------------------------------------------------- contrib/clients/python/lens/client/auth.py | 6 ++++-- contrib/clients/python/lens/client/query.py | 4 ++-- contrib/clients/python/setup.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lens/blob/fa2df7cb/contrib/clients/python/lens/client/auth.py ---------------------------------------------------------------------- diff --git a/contrib/clients/python/lens/client/auth.py b/contrib/clients/python/lens/client/auth.py index fccc75c..180bfee 100644 --- a/contrib/clients/python/lens/client/auth.py +++ b/contrib/clients/python/lens/client/auth.py @@ -14,12 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from future.standard_library import install_aliases +install_aliases() + import kerberos from requests.auth import AuthBase import subprocess import threading -from urlparse import urlparse - +from urllib.parse import urlparse class SpnegoAuth(AuthBase): def __init__(self, keytab=None, user=None): http://git-wip-us.apache.org/repos/asf/lens/blob/fa2df7cb/contrib/clients/python/lens/client/query.py ---------------------------------------------------------------------- diff --git a/contrib/clients/python/lens/client/query.py b/contrib/clients/python/lens/client/query.py index 8b0616b..7530e02 100644 --- a/contrib/clients/python/lens/client/query.py +++ b/contrib/clients/python/lens/client/query.py @@ -164,7 +164,7 @@ class LensQueryClient(object): def __call__(self, **filters): filters['sessionid'] = self._session._sessionid - if ignoreCert == 'true': + if self.ignoreCert == 'true': resp = requests.get(self.base_url + "queries/", params=filters, headers={'accept': 'application/json'}, @@ -182,7 +182,7 @@ class LensQueryClient(object): if item in self.finished_queries: return self.finished_queries[item] - if ignoreCert == 'true': + if self.ignoreCert == 'true': resp = requests.get(self.base_url + "queries/" + item, params={'sessionid': self._session._sessionid}, headers={'accept': 'application/json'}, auth=SpnegoAuth(self.keytab, self.principal), verify=False) http://git-wip-us.apache.org/repos/asf/lens/blob/fa2df7cb/contrib/clients/python/setup.py ---------------------------------------------------------------------- diff --git a/contrib/clients/python/setup.py b/contrib/clients/python/setup.py index 5c64067..1675f45 100644 --- a/contrib/clients/python/setup.py +++ b/contrib/clients/python/setup.py @@ -57,7 +57,7 @@ setup( license='Apache Software License', author='Apache', tests_require=['tox'], - install_requires=['requests>=2.9.1', 'six>=1.10.0', 'pykerberos==1.2.1'], + install_requires=['requests>=2.9.1', 'six>=1.10.0', 'pykerberos==1.2.1', 'future'], cmdclass={'test': Tox}, author_email='[email protected]', description='Python Lens Client',
