Skip to content

Commit

Permalink
Whoopse. Forgot the exitcode variable for the error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
HunnyPuns committed Mar 16, 2023
1 parent 356030c commit 4bda3ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions check_by_winrm/check_by_winrm.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@
command = winrmsession.run_ps(pscommand)
except winrm.exceptions.InvalidCredentialsError as Error:
print("Unable to connect to the specified Windows machine: {0}\nWinRM Error: {1}".format(args.host, Error))
exit()
exit(exitcode)
except Exception as Error:
print("Unknown error occurred connecting to the specified Windows machine: {0}\nWinRM Error: {1}".format(args.host, Error))
exit()
exit(exitcode)

if (args.verbose is 1):
verboseout = f"""
Expand Down

0 comments on commit 4bda3ea

Please sign in to comment.