Skip to content

Commit

Permalink
change file write method
Browse files Browse the repository at this point in the history
  • Loading branch information
changfei committed Dec 7, 2023
1 parent 730cfb2 commit 8ac324e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lyrebird_bugit/attachment.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def export_attachment_file(attachment_obj):
full_name = f'{attachment_obj.get("name", "")}.{attachment_obj.get("attachmentType", "json")}'

try:
with open(str(ATTACHMENT_ROOT / full_name), 'w') as f:
with codecs.open(str(ATTACHMENT_ROOT / full_name), 'w') as f:
json.dump(attachment_obj['eventObj'], f, indent=4)
except Exception:
return {
Expand Down

0 comments on commit 8ac324e

Please sign in to comment.