From 063d3b7869880f79461d3bb0565d16008806b0b5 Mon Sep 17 00:00:00 2001 From: b3yond Date: Sun, 23 Jul 2017 14:40:30 +0200 Subject: [PATCH] CRLF missing in log format, experimenting with twitter api rate limit --- retootbot.py | 2 +- retweetbot.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/retootbot.py b/retootbot.py index 48c91ac..e52a6b4 100644 --- a/retootbot.py +++ b/retootbot.py @@ -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 diff --git a/retweetbot.py b/retweetbot.py index fbae911..c8fe866 100644 --- a/retweetbot.py +++ b/retweetbot.py @@ -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)