summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/op_mode/powerctrl.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/op_mode/powerctrl.py b/src/op_mode/powerctrl.py
index b2fb5fe5a..69af427ec 100755
--- a/src/op_mode/powerctrl.py
+++ b/src/op_mode/powerctrl.py
@@ -71,8 +71,8 @@ def get_shutdown_status():
def check_shutdown():
output = get_shutdown_status()
- dt = datetime.strptime(output['DATETIME'], '%Y-%m-%d %H:%M:%S')
if output and 'MODE' in output:
+ dt = datetime.strptime(output['DATETIME'], '%Y-%m-%d %H:%M:%S')
if output['MODE'] == 'reboot':
print("Reboot is scheduled", utc2local(dt))
elif output['MODE'] == 'poweroff':