From bc054a691850b5a1d0d328ede9f0ab4bfec743f4 Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Thu, 10 Jan 2019 10:59:51 -0500 Subject: [PATCH] add some standard python boilerplate --- ephemetoot.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ephemetoot.py b/ephemetoot.py index 88f0291..a1a0110 100644 --- a/ephemetoot.py +++ b/ephemetoot.py @@ -72,6 +72,7 @@ def checkToots(timeline, deleted_count=0): print('No toots found!') # trigger from here -account = mastodon.account(user_id) -print('Checking ' + str(account.statuses_count) + ' toots...') -checkToots(timeline) +if __name__ == '__main__': + account = mastodon.account(user_id) + print('Checking ' + str(account.statuses_count) + ' toots...') + checkToots(timeline)