Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update email.py #463

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update email.py #463

wants to merge 1 commit into from

Conversation

ranlo
Copy link

@ranlo ranlo commented Oct 18, 2023

added check for null lastUpdated to prevent crashes

added check for null lastUpdated to prevent crashes
if target.sourceIds[container].lastUpdated:
print(f"Last profile edit : {target.sourceIds[container].lastUpdated.strftime('%Y/%m/%d %H:%M:%S (UTC)')}\n")
else:
gb.rc.print(f"Last profile edit : [italic]Not found.[/italic]\n")
Copy link
Contributor

@4383 4383 Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using gb.rc (the rich console) in the else section and not in the if section?
I'd suggest to use one or the other in both sections.

Copy link
Contributor

@4383 4383 Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I see the rich console documentation and the markup langage, so I suppose you used it to display in italic https://rich.readthedocs.io/en/stable/markup.html?highlight=italic#console-markup

Ignore my previous comment, your code LGTM

Copy link

@shion1305 shion1305 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants