Browse Source

Fixed empty recv case (#4577).

master
Christian P. MOMON 9 months ago
committed by root
parent
commit
7969bf68f6
  1. 4
      redminebot.py

4
redminebot.py

@ -171,8 +171,8 @@ class Bot(object):
def msg_handler(self): # pragma: no cover (this excludes this function from testing)
new_msg = self.ircsock.recv(2048) # receive data from the server
if not new_msg:
print "Empty recv."
new_msg=''
print "Empty recv. It seems I’ve lost my mind. I stop to be reborn."
sys.exit(7)
else:
new_msg = new_msg.strip('\n\r') # removing any unnecessary linebreaks
if new_msg != '' and new_msg.find("PING :") == -1:

Loading…
Cancel
Save