Browse Source

Make sure that service_set and service_get are only invoked when running as a service

Yentl Van Tendeloo 8 years ago
parent
commit
1d39be8dac
1 changed files with 4 additions and 0 deletions
  1. 4 0
      wrappers/modelverse.py

+ 4 - 0
wrappers/modelverse.py

@@ -978,10 +978,14 @@ def service_stop():
 
 def service_get(port):
     """Get the values on the specified port."""
+    _goto_mode(MODE_SERVICE)
+
     return _output(port=port)
 
 def service_set(port, value):
     """Set a value on a specified port."""
+    _goto_mode(MODE_SERVICE)
+
     _input(value, port=port)
 
 def password_change(user, password):