From f71d072d189c202d026451d87c5eccb84c750742 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Mon, 27 Feb 2017 22:16:29 +0100 Subject: [PATCH] Properly handle deleted account --- filler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/filler.py b/filler.py index 6a9ca98..d23a7bc 100755 --- a/filler.py +++ b/filler.py @@ -89,7 +89,11 @@ def getFollowers(db=dbtools.dbHelper(), two=twitools.twObject(), firstrun=False) if follower not in new and dbtools.fillerfilter.followerFilter(follower, False): db.executeQuery("UPDATE followers SET `until` = %i WHERE `id` = '%s' AND `until` = 0" % (int(time.time()), str(follower))) db.commit() - print("Lost follower: %s" % twitools.getNameByID(follower)) + try: + lostname = twitools.getNameByID(follower) + except: + lostname = "Disabled account" + print("Lost follower: %s" % lostname) lost += 1 return gained, lost