use LATClientException not just Exception
authorCameron Patrick <cameron@ucc.asn.au>
Sun, 1 Aug 2004 04:25:54 +0000 (04:25 +0000)
committerCameron Patrick <cameron@ucc.asn.au>
Sun, 1 Aug 2004 04:25:54 +0000 (04:25 +0000)
sql-edition/servers/LATClient.py

index 362a452..b7818de 100644 (file)
@@ -10,6 +10,8 @@ LATCP_CMD_VERSION = 8
 LATCP_CMD_TERMINALSESSION = 26
 LATCP_CMD_ERRORMSG = 99
 
+class LATClientException(Exception): pass
+
 class LATClient:
        def __init__(self, service = None, node = None, port = None,
                     localport = None, password = None, is_queued = False,
@@ -42,7 +44,7 @@ class LATClient:
                         ))
                (cmd, msg) = self.read_reply()
                if ord(cmd) == LATCP_CMD_ERRORMSG:
-                       raise Exception('LATClient: '+msg)
+                       raise LATClientException(msg)
 
                r = select([self.sock], [], [], 2.0)[0]
                if r:

UCC git Repository :: git.ucc.asn.au