git.ucc.asn.au
/
uccvend-vendserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename door
[uccvend-vendserver.git]
/
sql-edition
/
servers
/
LATClient.py
diff --git
a/sql-edition/servers/LATClient.py
b/sql-edition/servers/LATClient.py
index
4b2a1d9
..
ead307a
100644
(file)
--- a/
sql-edition/servers/LATClient.py
+++ b/
sql-edition/servers/LATClient.py
@@
-32,8
+32,16
@@
class LATClient:
len(password), password
))
(cmd, msg) = self.read_reply()
len(password), password
))
(cmd, msg) = self.read_reply()
- if cmd == LATCP_CMD_ERRORMSG:
- raise Exception
+ if ord(cmd) == LATCP_CMD_ERRORMSG:
+ raise Exception('LATClient: '+msg)
+
+ def __del__(self):
+ try:
+ self.sock.close()
+ self.sock.shutdown(2)
+ except:
+ pass
+ del self.sock
def send_msg(self, cmd, msg):
self.sock.send('%c%c%c%s'%(cmd, len(msg)/256, len(msg)%256, msg))
def send_msg(self, cmd, msg):
self.sock.send('%c%c%c%s'%(cmd, len(msg)/256, len(msg)%256, msg))
UCC
git Repository :: git.ucc.asn.au