mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-08 11:40:32 -07:00
jira - fixed base64 decode bug (#2349)
* fixed base64 decode bug * added changelog fragment
This commit is contained in:
parent
399c0ef849
commit
8ddb81a36f
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/2349-jira-bugfix-b64decode.yml
Normal file
2
changelogs/fragments/2349-jira-bugfix-b64decode.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- jira - fixed error when loading base64-encoded content as attachment (https://github.com/ansible-collections/community.general/pull/2349).
|
|
@ -596,7 +596,7 @@ def _prepare_attachment(filename, content=None, mime_type=None):
|
||||||
content = f.read()
|
content = f.read()
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
content = base64.decode(content)
|
content = base64.b64decode(content)
|
||||||
except binascii.Error as e:
|
except binascii.Error as e:
|
||||||
raise Exception("Unable to base64 decode file content: %s" % e)
|
raise Exception("Unable to base64 decode file content: %s" % e)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue