Skip to content

Commit 480bc47

Browse files
authored
[ISSUE-1242] prevented weird exceptions related to integer handling (#1244)
if keys or values in the response json are `int`s, the `k + ": " + v` will fail because of an `int` is not a `str`. In order to avoid this, we can either use `%`-formatting, `.format` formatting, or f-strings. We chose `.format` for compatability, but regardless of which direction, the issue should be addressed one of those ways.
1 parent 15471bf commit 480bc47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

atlassian/rest_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def raise_for_status(self, response):
481481
try:
482482
j = response.json()
483483
if self.url == "https://api.atlassian.com":
484-
error_msg = "\n".join([k + ": " + v for k, v in j.items()])
484+
error_msg = "\n".join(["{}: {}".format(k, v) for k, v in j.items()])
485485
else:
486486
error_msg_list = j.get("errorMessages", list())
487487
errors = j.get("errors", dict())

0 commit comments

Comments
 (0)