diff --git a/dbtools/__init__.py b/dbtools/__init__.py index a0df836..5087cb5 100644 --- a/dbtools/__init__.py +++ b/dbtools/__init__.py @@ -75,12 +75,12 @@ class dbObject: return setuptools.getDate(str(self.getNext()["%s(SUBSTR(timestamp,0,11))" % mode])) def getFollowers(db): - db.executeQuery("SELECT id FROM followers;") + db.executeQuery("SELECT id FROM followers WHERE `until` IS NOT NULL;") for i in db.getAll(): yield i[0] def getFollowing(db): - db.executeQuery("SELECT id FROM following;") + db.executeQuery("SELECT id FROM following WHERE `until` IS NOT NULL;") for i in db.getAll(): yield i[0] diff --git a/filler.py b/filler.py index da3342f..657301f 100755 --- a/filler.py +++ b/filler.py @@ -58,10 +58,6 @@ def getFollowers(db=dbtools.dbHelper(), two=twitools.twObject()): gained = 0 lost = 0 - if len(new) == 0: - print("Something went wrong here. -.-") - return 0,0 - for follower in new: if follower not in current: db.executeQuery("INSERT INTO followers VALUES('%s', %i, NULL)" % (follower, int(time.time())))