summaryrefslogtreecommitdiff
path: root/bin/tiny_socket.py
diff options
context:
space:
mode:
authorced <>2007-08-09 08:17:48 +0000
committerced <>2007-08-09 08:17:48 +0000
commit1cee6d32cfd728dae6b4a0a00d9f532032012e0c (patch)
treeb805bbfd292c815fb408831c8f82ed819131c069 /bin/tiny_socket.py
parent6ffa3f78ef01445ca511f09bd4fc97179cc4b8a5 (diff)
improve tiny_socket exception
bzr revid: ced-26049a63bda7b1543a0b2b8f4efbcb94006604ab
Diffstat (limited to 'bin/tiny_socket.py')
-rw-r--r--bin/tiny_socket.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/tiny_socket.py b/bin/tiny_socket.py
index 95c1296fc2f..5a9a894aae8 100644
--- a/bin/tiny_socket.py
+++ b/bin/tiny_socket.py
@@ -6,6 +6,7 @@ class Myexception(Exception):
def __init__(self, faultCode, faultString):
self.faultCode = faultCode
self.faultString = faultString
+ super(Myexception, self).__init__(faultCode, faultString)
class mysocket:
def __init__(self, sock=None):
@@ -14,7 +15,7 @@ class mysocket:
socket.AF_INET, socket.SOCK_STREAM)
else:
self.sock = sock
- self.sock.settimeout(60)
+ self.sock.settimeout(120)
def connect(self, host, port=False):
if not port:
protocol, buf = host.split('//')
@@ -56,8 +57,7 @@ class mysocket:
res = cPickle.loads(msg)
if isinstance(res[0],Exception):
if exception:
- raise Myexception(exception, str(res[0]), str(res[1]))
+ raise Myexception(str(res[0]), str(res[1]))
raise res[0]
else:
return res[0]
-