[dts] [PATCH 1/2] framework: add exception for closed session

Yong Liu yong.liu at intel.com
Wed May 13 07:49:05 CEST 2015


From: Marvin Liu <yong.liu at intel.com>

Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/framework/exception.py b/framework/exception.py
index be38c16..17bfccf 100644
--- a/framework/exception.py
+++ b/framework/exception.py
@@ -46,3 +46,17 @@ class SSHConnectionException(Exception):
 
     def __str__(self):
         return 'Error trying to connect with %s' % self.host
+
+
+class SSHSessionDeadException(Exception):
+
+    """
+    SSH session is not alive.
+    It can no longer be used.
+    """
+
+    def __init__(self, host):
+        self.host = host
+
+    def __str__(self):
+        return 'SSH session with %s has been dead' % self.host
-- 
1.9.3



More information about the dts mailing list