Get error when add crumb to request
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python Jenkins |
New
|
Undecided
|
Unassigned |
Bug Description
When install python-jenkins 1.7.0, requests 2.25.1, I fail to call delete_build function.
>>> jenkins_
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/root/
self.
File "/root/
return self.jenkins_
File "/root/
self.
File "/root/
req.
TypeError: 'bytes' object does not support item assignment
The error is caused by code:
def delete_build(self, name, number):
"""Delete a Jenkins build.
:param name: Name of Jenkins job, ``str``
:param number: Jenkins build number for the job, ``int``
"""
folder_url, short_name = self._get_
import pdb
It add b'' as a parameter of requests.Request. This parameter isn't helpful, and is passed to requests.Request as its heads in requests 2.25.1. I think we should remove it.
yes the parameter b'', cause exception. should be removed.