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
(parent:
dde11f1
)
Fix crash on server connect error.
author
Christian Heller
<c.heller@plomlompom.de>
Fri, 1 Jul 2016 21:13:19 +0000
(23:13 +0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Fri, 1 Jul 2016 21:13:19 +0000
(23:13 +0200)
plomlombot.py
patch
|
blob
|
history
diff --git
a/plomlombot.py
b/plomlombot.py
index 4c44cf4a525d2c7955af0f38cd08aa795b0c729c..80def0db6990eba4dd76fd180529e648cf8c3883 100755
(executable)
--- a/
plomlombot.py
+++ b/
plomlombot.py
@@
-118,7
+118,10
@@
class IO:
self.line_buffer = []
self.rune_buffer = ""
self.last_pong = time.time()
- self.servername = self.recv_line(send_ping=False).split(" ")[0][1:]
+ line = self.recv_line(send_ping=False)
+ if not line or len(line) < 1:
+ raise ExceptionForRestart
+ self.servername = line.split(" ")[0][1:]
def _pingtest(self, send_ping=True):
if self.last_pong + self.timeout < time.time():