Skip to content

Commit

Permalink
jiralogin: workaround python jira bug
Browse files Browse the repository at this point in the history
Looks like its a bug in the jira python library.  An issue has been
created in Atlassian and in the python jira library.

Until its fixed upstream we add this workaround when authenticate in
JIRA.

Link: https://community.developer.atlassian.com/t/http-406-status-code-from-rest-api-3-resolution-search/75381/5
Link: pycontribs/jira#1774
Suggested-by: Julianus Larson <julianus.larson@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
  • Loading branch information
roxell committed Dec 14, 2023
1 parent eb3fd7d commit 3a6ecd8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion jipdate/jiralogin.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,16 @@ def get_jira_instance(use_test_server):
"Accessing %s with %s using token based authentication"
% (url, username)
)
j = JIRA(url, basic_auth=(username, token)), username
j = (
JIRA(
url,
basic_auth=(username, token),
options={
"headers": {"Accept": "application/json;1=1.0, */*;q=0.9"}
},
),
username,
)
else:
log.debug(
"Accessing %s with %s using password based authentication"
Expand Down

0 comments on commit 3a6ecd8

Please sign in to comment.