mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-20 07:30:54 +01:00
Fixed IndexError on empty deepthoughtq.
This commit is contained in:
parent
b1a1c85a17
commit
ee805e2860
@ -62,7 +62,8 @@ class Http(callbacks.Privmsg):
|
|||||||
"""
|
"""
|
||||||
url = 'http://www.tremorseven.com/aim/deepaim.php?job=view'
|
url = 'http://www.tremorseven.com/aim/deepaim.php?job=view'
|
||||||
thought = ' ' * 512
|
thought = ' ' * 512
|
||||||
while time.time() - self.deepthoughtq[0][0] > 86400:
|
now = time.time()
|
||||||
|
while self.deepthoughtq and now - self.deepthoughtq[0][0] > 86400:
|
||||||
self.deepthoughtq.dequeue()
|
self.deepthoughtq.dequeue()
|
||||||
while len(thought) > 450 or thought in self.deepthoughtq:
|
while len(thought) > 450 or thought in self.deepthoughtq:
|
||||||
fd = urllib2.urlopen(url)
|
fd = urllib2.urlopen(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user