Camble / Safe-Power-Monitor

Camble - SudoMod
http://sudomod.com/forum/memberlist.php?mode=viewprofile&u=76
21 stars 7 forks source link

Update safe_power_monitor.py #14

Closed davidmpye closed 3 years ago

davidmpye commented 4 years ago

FIx issue where the script silently dies.

If logging is enabled, if the PATH for the logfile (logFile = os.getenv('HOME') + "/Safe-Power-Monitor/log.txt") doesnt exist, open fails, as the dir isnt there, and the script throws an exception (without logging it) and terminates.

This fixes it.