← Back to team overview

python-jenkins-developers team mailing list archive

[Bug 810396] Re: get_job_config fails when authentication required

 

** Changed in: python-jenkins
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is the registrant for Python Jenkins.
https://bugs.launchpad.net/bugs/810396

Title:
  get_job_config fails when authentication required

Status in Python API for Jenkins:
  Fix Released

Bug description:
  When I try to call get_job_config against an Jenkins instance that
  requires authentication I get the following stacktrace:

  Traceback (most recent call last):
    File "./test.py", line 13, in <module>
      print l_jenkins.get_job_config("test_git")
    File "/home/jamespage/src/oneiric/python-jenkins/upstream/python-jenkins/jenkins/__init__.py", line 289, in get_job_config
      return urllib2.urlopen(get_config_url).read()
    File "/usr/lib/python2.7/urllib2.py", line 126, in urlopen
      return _opener.open(url, data, timeout)
    File "/usr/lib/python2.7/urllib2.py", line 400, in open
      response = meth(req, response)
    File "/usr/lib/python2.7/urllib2.py", line 513, in http_response
      'http', request, response, code, msg, hdrs)
    File "/usr/lib/python2.7/urllib2.py", line 438, in error
      return self._call_chain(*args)
    File "/usr/lib/python2.7/urllib2.py", line 372, in _call_chain
      result = func(*args)
    File "/usr/lib/python2.7/urllib2.py", line 521, in http_error_default
      raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
  urllib2.HTTPError: HTTP Error 403: Forbidden

  Call needs to be wrapped in jenkins_open to ensure that
  username/password is passed in the request.

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-jenkins/+bug/810396/+subscriptions