Skip to content

Conversation

brenordv
Copy link

@brenordv brenordv commented Dec 3, 2023

Added IP info to the sys_info.py example. Also included a caching (default: 4 hours) since IP address is not something that changes frequently.

If something goes wrong, the line will be blank.

The rationale for this change is that the IP being displayed is super useful information to have at hand and goes well with all the other stats printed in this example.

Updated: Forgot to add psutil as a dependency. Sorry about that.

brenordv and others added 5 commits December 3, 2023 02:06
Added IP info to the sys_info.py example. Also included a caching (default: 4 hours) since IP address is not something that changes frequently.
Changed the strategy for failure cases. Now returning an empty string and (hopefully) ensuring nothing else will go wrong (like failing to display None).
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.

1 participant