CRLF missing in log format, experimenting with twitter api rate limit
This commit is contained in:
parent
b3fa55104c
commit
063d3b7869
|
@ -41,7 +41,7 @@ class RetootBot(object):
|
|||
message = message + " The traceback is located at " + os.path.join("logs" + time)
|
||||
with open(os.path.join("logs", time), 'w+') as f:
|
||||
f.write(tb)
|
||||
line = "[" + time + "] "+ message
|
||||
line = "[" + time + "] "+ message + "\n"
|
||||
with open(self.logpath, 'a') as f:
|
||||
f.write(line)
|
||||
print line
|
||||
|
|
|
@ -85,7 +85,7 @@ class RetweetBot(object):
|
|||
message = message + " The traceback is located at " + os.path.join("logs" + time)
|
||||
with open(os.path.join("logs", time), 'w+') as f:
|
||||
f.write(tb)
|
||||
line = "[" + time + "] "+ message
|
||||
line = "[" + time + "] "+ message + "\n"
|
||||
with open(self.logpath, 'a') as f:
|
||||
f.write(line)
|
||||
print line
|
||||
|
@ -136,7 +136,7 @@ class RetweetBot(object):
|
|||
return mentions
|
||||
except twitter.TwitterError:
|
||||
self.log("Twitter API Error: Rate Limit Exceeded.")
|
||||
sleep(60)
|
||||
sleep(120)
|
||||
except requests.exceptions.ConnectionError:
|
||||
self.log("Twitter API Error: Bad Connection.")
|
||||
sleep(10)
|
||||
|
|
Loading…
Reference in a new issue