← Back to team overview

python-jenkins-developers team mailing list archive

[Bug 1500898] Re: create_node() raises HTTP Error 400 Bad Request

 

Reviewed:  https://review.openstack.org/254644
Committed: https://git.openstack.org/cgit/openstack/python-jenkins/commit/?id=302eb5dad6439842e076fead5bd76f20f615e6a8
Submitter: Jenkins
Branch:    master

commit 302eb5dad6439842e076fead5bd76f20f615e6a8
Author: Dong Ma <winterma.dong@xxxxxxxxx>
Date:   Tue Dec 8 17:49:38 2015 +0800

    Fixed create_node() Error
    
    Fixed create_node() raises HTTP Error 400 Bad Request
    
    This issue caused by:
        self.jenkins_open(Request(
            self._build_url(CREATE_NODE, params), b''))
    The "params" dictionary of options isn't parsed correctly
    during _build_url funciton that Jenkins is expecting
    
    Fixed it use urlencode to parse the params and construct
    the URL
    
    Change-Id: I85fa43bc0b4ff1530133b862734e94aede9b44a5
    Closes-Bug: #1500898


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

-- 
You received this bug notification because you are a member of Python
Jenkins Developers, which is subscribed to Python Jenkins.
https://bugs.launchpad.net/bugs/1500898

Title:
  create_node() raises HTTP Error 400 Bad Request

Status in Python Jenkins:
  Fix Released

Bug description:
  after update to version 0.4.9 create_node() function raises error

  >>> j.create_node(name="testest",numExecutors=1,nodeDescription='',remoteFS="/home/vagrant/jenkins")
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\site-packages\jenkins\__init__.py", line 1156, in create_node
      self._build_url(CREATE_NODE, params), b''))
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\site-packages\jenkins\__init__.py", line 341, in jenkins_open
      response = urlopen(req, timeout=self.timeout).read()
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 162, in urlopen
      return opener.open(url, data, timeout)
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 471, in open
      response = meth(req, response)
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 581, in http_response

      'http', request, response, code, msg, hdrs)
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 509, in error
      return self._call_chain(*args)
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 443, in _call_chain
      result = func(*args)
    File "C:\Users\galexandrov\AppData\Local\Programs\Python\Python35\lib\urllib\request.py", line 589, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  urllib.error.HTTPError: HTTP Error 400: Bad Request

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


References