Commit 69d26d50 by Michael DeHaan

Merge pull request #5758 from drawks/devel

Correct sleep calls
parents 16ca4c21 e545d102
...@@ -130,7 +130,7 @@ def send_msg(channel, msg, server='localhost', port='6667', ...@@ -130,7 +130,7 @@ def send_msg(channel, msg, server='localhost', port='6667',
break break
elif time.time() - start > timeout: elif time.time() - start > timeout:
raise Exception('Timeout waiting for IRC server welcome response') raise Exception('Timeout waiting for IRC server welcome response')
time.sleep(0.5) sleep(0.5)
irc.send('JOIN %s\r\n' % channel) irc.send('JOIN %s\r\n' % channel)
join = '' join = ''
...@@ -141,13 +141,13 @@ def send_msg(channel, msg, server='localhost', port='6667', ...@@ -141,13 +141,13 @@ def send_msg(channel, msg, server='localhost', port='6667',
break break
elif time.time() - start > timeout: elif time.time() - start > timeout:
raise Exception('Timeout waiting for IRC JOIN response') raise Exception('Timeout waiting for IRC JOIN response')
time.sleep(0.5) sleep(0.5)
irc.send('PRIVMSG %s :%s\r\n' % (channel, message)) irc.send('PRIVMSG %s :%s\r\n' % (channel, message))
time.sleep(1) sleep(1)
irc.send('PART %s\r\n' % channel) irc.send('PART %s\r\n' % channel)
irc.send('QUIT\r\n') irc.send('QUIT\r\n')
time.sleep(1) sleep(1)
irc.close() irc.close()
# =========================================== # ===========================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment