Comment 3 for bug 1781381

Revision history for this message
Robbert Korving (robkorv) wrote :

For some reason the `req.headers` in `maybe_add_crumb` are in bytes when `delete_build` is called with python3.

I fixed this with the following diff:

```diff
--- /home/robkorv/.local/lib/python3.5/site-packages/jenkins/__init__.py (Selection)
+++ (clipboard)
@@ -10,5 +10,5 @@
                 self.crumb = False
             else:
                 self.crumb = json.loads(response)
- if self.crumb:
+ if self.crumb and isinstance(req.headers, dict):
             req.headers[self.crumb['crumbRequestField']] = self.crumb['crumb']

```