CRLF missing in log format, experimenting with twitter api rate limit

This commit is contained in:
b3yond 2017-07-23 14:40:30 +02:00
parent b3fa55104c
commit 063d3b7869
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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)