Skip to content

get_host_uptime.py #1086

Answered by jshcodes
cyberbeach33 asked this question in Q&A
Nov 28, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @cyberbeach33 -

I can't recreate this issue directly which has me wondering if it may be a date format or regional setting on the host. (That's just a guess.) Let's try removing the problematic part altogether.

If you replace line 147 with the following, does the code execute without error when you target a Windows host?

incoming = datetime.strptime(incoming[:incoming.find("+")][:incoming.find(".")], "%Y%m%d%H%M%S")

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cyberbeach33
Comment options

Answer selected by cyberbeach33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
code samples Functioning sample code to get you started RTR Real Time Response issues and questions
2 participants