It seems more appropriate to update the request object instead. With your patch, you'll ignore added headers(including the crumb).
To prevent this, just change the request instanciation for the delete_build call (wipeout_job_workspace has the same call so it fixes that as well):
It seems more appropriate to update the request object instead. With your patch, you'll ignore added headers(including the crumb). job_workspace has the same call so it fixes that as well):
To prevent this, just change the request instanciation for the delete_build call (wipeout_
diff --git a/jenkins/ __init_ _.py b/jenkins/ __init_ _.py __init_ _.py __init_ _.py
folder_ url, short_name = self._get_ job_folder( name)
self. jenkins_ open(requests. Request( 'POST', url(DELETE_ BUILD, locals()), b'')) url(DELETE_ BUILD, locals())))
index 620ce14..0691f2a 100755
--- a/jenkins/
+++ b/jenkins/
@@ -1469,7 +1469,7 @@ class Jenkins(object):
"""
- self._build_
+ self._build_
def wipeout_ job_workspace( self, name):
folder_ url, short_name = self._get_ job_folder( name)
self. jenkins_ open(requests. Request( 'POST',
self. _build_ url(WIPEOUT_ JOB_WORKSPACE,
"""Wipe out workspace for given Jenkins job.
@@ -1479,7 +1479,7 @@ class Jenkins(object):
- locals()), b''))
+ locals())))
def get_running_ builds( self):
'''Return list of running builds.