Skip to content

Instantly share code, notes, and snippets.

@mistermocha
Last active September 1, 2015 16:36
Show Gist options
  • Save mistermocha/90cad7b51087ed2af3f6 to your computer and use it in GitHub Desktop.
Save mistermocha/90cad7b51087ed2af3f6 to your computer and use it in GitHub Desktop.
Bug! KrbRequester.get_request_dict needs **kwargs
In [9]: krb = KrbRequester(ssl_verify=True)
In [10]: j = Jenkins('my.jenkins.url', requester=krb)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-10-d808c7f8c492> in <module>()
----> 1 j = Jenkins('ci.twitter.biz', requester=krb)
/opt/twitter/lib/python2.7/site-packages/jenkinsapi/jenkins.pyc in __init__(self, baseurl, username, password, requester, lazy)
55 baseurl=baseurl)
56 self.lazy = lazy
---> 57 JenkinsBase.__init__(self, baseurl, poll=not lazy)
58
59 def _poll_if_needed(self):
/opt/twitter/lib/python2.7/site-packages/jenkinsapi/jenkinsbase.pyc in __init__(self, baseurl, poll)
32 self.baseurl = self.strip_trailing_slash(baseurl)
33 if poll:
---> 34 self.poll()
35
36 def get_jenkins_obj(self):
/opt/twitter/lib/python2.7/site-packages/jenkinsapi/jenkinsbase.pyc in poll(self, tree)
55
56 def poll(self, tree=None):
---> 57 data = self._poll(tree=tree)
58 if 'jobs' in data:
59 data['jobs'] = self.resolve_job_folders(data['jobs'])
/opt/twitter/lib/python2.7/site-packages/jenkinsapi/jenkinsbase.pyc in _poll(self, tree)
65 def _poll(self, tree=None):
66 url = self.python_api_url(self.baseurl)
---> 67 return self.get_data(url, tree=tree)
68
69 def get_data(self, url, params=None, tree=None):
/opt/twitter/lib/python2.7/site-packages/jenkinsapi/jenkinsbase.pyc in get_data(self, url, params, tree)
75 params.update({'tree': tree})
76
---> 77 response = requester.get_url(url, params)
78 if response.status_code != 200:
79 logging.error('Failed request at %s with params: %s %s',
/opt/twitter/lib/python2.7/site-packages/jenkinsapi/utils/requester.pyc in get_url(self, url, params, headers, allow_redirects)
97 params=params,
98 headers=headers,
---> 99 allow_redirects=allow_redirects)
100 return requests.get(self._update_url_scheme(url), **requestKwargs)
101
TypeError: get_request_dict() got an unexpected keyword argument 'allow_redirects'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment