summaryrefslogtreecommitdiffstats
path: root/pysystemmgr
diff options
context:
space:
mode:
Diffstat (limited to 'pysystemmgr')
-rw-r--r--pysystemmgr/system_manager.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pysystemmgr/system_manager.py b/pysystemmgr/system_manager.py
index 6f4bf81..e6bdd29 100644
--- a/pysystemmgr/system_manager.py
+++ b/pysystemmgr/system_manager.py
@@ -161,8 +161,10 @@ class SystemManager(DbusProperties, DbusObjectManager):
gpio_num = -1
r = ['', gpio_num, '']
if name not in System.GPIO_CONFIG:
- # TODO: Error handling
- print "ERROR: "+name+" not found in GPIO config table"
+ # TODO: Better error handling
+ msg = "ERROR: "+name+" not found in GPIO config table"
+ print msg
+ raise Exception(msg)
else:
gpio_num = -1
@@ -173,7 +175,9 @@ class SystemManager(DbusProperties, DbusObjectManager):
if 'gpio_pin' in System.GPIO_CONFIG[name]:
gpio_num = obmc.system.convertGpio(gpio['gpio_pin'])
else:
- print "ERROR: SystemManager - GPIO lookup failed for "+name
+ msg = "ERROR: SystemManager - GPIO lookup failed for "+name
+ print msg
+ raise Exception(msg)
if (gpio_num != -1):
r = [obmc.enums.GPIO_DEV, gpio_num, gpio['direction']]
OpenPOWER on IntegriCloud