moved found_within to common.py
[monitor.git] / pcucontrol / util / command.py
index e5663c3..47627b4 100644 (file)
@@ -73,6 +73,9 @@ class CMD:
                except ExceptionReadTimeout:
                        print traceback.print_exc()
                        return ("", "RunningScriptTimeout")
+               except KeyboardInterrupt:
+                       print "Interrupted, exiting..."
+                       sys.exit(1)
                except Exception, err:
                        from monitor.common import email_exception
                        email_exception()
@@ -194,6 +197,7 @@ class SSH(CMD):
        def run_noexcept2(self, cmd, timeout=COMMAND_TIMEOUT*2):
                cmd = "exec ssh -p %s %s %s@%s %s" % (self.port, self.__options_to_str(), 
                                                                        self.user, self.host, cmd)
+               #print cmd
                r = CMD.run_noexcept(self, cmd, timeout)
                self.ret = -1