From d745ad6520a2d139628a0a3d9dc80135b89cc39b Mon Sep 17 00:00:00 2001 From: b3yond Date: Tue, 11 Jul 2017 21:51:37 +0200 Subject: [PATCH] improve docs & error messages --- README.md | 8 ++++---- retweetbot.py | 3 ++- ticketfrei.py | 3 ++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7ebad26..a785f0b 100644 --- a/README.md +++ b/README.md @@ -11,16 +11,16 @@ There is one security hole: people could start mentioning the bot with useless i # Install -Install python3 with your favourite package manager. +Install python and virtualenv with your favourite package manager. Create and activate virtualenv + ```shell -$ virtualenv -p python3 . +$ virtualenv -p python2 . $ . bin/activate ``` Install dependencies ```shell -$ pip3 install Mastodon.py pytoml -$ pip install python-twitter pytoml requests +$ pip install python-twitter pytoml requests Mastodon.py ``` Configure ```shell diff --git a/retweetbot.py b/retweetbot.py index b082558..5ceb4df 100644 --- a/retweetbot.py +++ b/retweetbot.py @@ -195,5 +195,6 @@ if __name__ == "__main__": while True: bot.flow() sleep(6) - except: + except Exception as e: + print(e) bot.shutdown() diff --git a/ticketfrei.py b/ticketfrei.py index bc8a49a..f260778 100644 --- a/ticketfrei.py +++ b/ticketfrei.py @@ -22,5 +22,6 @@ if __name__ == '__main__': statuses = mbot.retoot(statuses) statuses = tbot.flow(statuses) time.sleep(1) - except: + except Exception as e: + print e tbot.shutdown()