home
·
contact
·
privacy
projects
/
plomlombot-irc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2c9b764
)
Re-try on TimeoutError on socket connect.
author
Christian Heller
<c.heller@plomlompom.de>
Sun, 17 Apr 2016 08:31:23 +0000
(10:31 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Sun, 17 Apr 2016 08:31:23 +0000
(10:31 +0200)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index cde978a1f2fb063ede7ba05d9add76d7aa1713f5..61da87140fca80d902042d933b0b235fe25dcd0c 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-53,7
+53,10
@@
class IO:
def __init__(self, server, port, timeout):
self.timeout = timeout
self.socket = socket.socket()
- self.socket.connect((server, port))
+ try:
+ self.socket.connect((server, port))
+ except TimeoutError:
+ raise ExceptionForRestart
self.socket.setblocking(0)
self.line_buffer = []
self.rune_buffer = ""