Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota002 committed Jan 30, 2024
1 parent f77efe3 commit debb872
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gcn_email/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ def kafka_message_to_email(message):
valueJson = json.loads(message.value().decode())
for key in valueJson:
if sys.getsizeof(valueJson[key]) > 512:
valueJson[key] = 'This content is too large for email. '\
'To receive it, see https://gcn.nasa.gov/quickstart'
valueJson[key] = (
'This content is too large for email. '
'To receive it, see https://gcn.nasa.gov/quickstart'
)
email_message.set_content(json.dumps(valueJson, indent=4))
else:
email_message.add_attachment(
Expand Down

0 comments on commit debb872

Please sign in to comment.