catch the 'cable error' status in ipals
authorStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 17 Mar 2009 18:58:23 +0000 (18:58 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Tue, 17 Mar 2009 18:58:23 +0000 (18:58 +0000)
reboot.py

index 67be293..34b9b00 100755 (executable)
--- a/reboot.py
+++ b/reboot.py
@@ -343,6 +343,8 @@ class IPAL(PCUControl):
                        elif status == '0':
                                # down
                                power_on = False
+                       elif status == '6':
+                               raise ExceptionPort("IPAL reported 'Cable Error' on %s socket %s : %s" % (self.host, node_port, ret))
                        else:
                                raise Exception("Unknown status for PCU %s socket %s : %s" % (self.host, node_port, ret))
                else:
@@ -371,6 +373,8 @@ class IPAL(PCUControl):
                                elif status == '0':
                                        # down
                                        power_on = False
+                               elif status == '6':
+                                       raise ExceptionPort("IPAL reported 'Cable Error' on %s socket %s : %s" % (self.host, node_port, ret))
                                else:
                                        raise Exception("Unknown status for PCU %s socket %s : %s" % (self.host, node_port, ret))
                        else: