summaryrefslogtreecommitdiff
path: root/src/op_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/op_mode')
-rwxr-xr-xsrc/op_mode/powerctrl.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/op_mode/powerctrl.py b/src/op_mode/powerctrl.py
index b517527bb..239f766fd 100755
--- a/src/op_mode/powerctrl.py
+++ b/src/op_mode/powerctrl.py
@@ -103,10 +103,9 @@ def cancel_shutdown():
print("Reboot or poweroff is not scheduled")
def check_unsaved_config():
- from vyos.config_mgmt import ConfigMgmt
+ from vyos.config_mgmt import unsaved_commits
- c = ConfigMgmt()
- if c._unsaved_commits():
+ if unsaved_commits():
print("Warning: there are unsaved configuration changes!")
print("Run 'save' command if you do not want to lose those changes after reboot/shutdown.")
else: