Fix apparent problems with database objects in filler
This commit is contained in:
parent
5fc9078ea8
commit
8381c4469a
1 changed files with 5 additions and 6 deletions
11
filler.py
11
filler.py
|
@ -24,8 +24,6 @@ def getTweets(db=dbtools.dbHelper(), user=twitools.twObject().whoami(), two=twit
|
|||
last = status.id
|
||||
tw_counter = tw_counter + 1
|
||||
|
||||
db.closeConnection()
|
||||
|
||||
return tw_counter, last, savepoint
|
||||
|
||||
def getMessages(db=dbtools.dbHelper(), two=twitools.twObject()):
|
||||
|
@ -97,11 +95,12 @@ def getFollowing(db=dbtools.dbHelper(), two=twitools.twObject()):
|
|||
return gained, lost
|
||||
|
||||
if __name__ == "__main__":
|
||||
count, last, first = getTweets()
|
||||
db = dbtools.dbHelper()
|
||||
count, last, first = getTweets(db)
|
||||
print("Stored %i tweets." % count)
|
||||
count, last, first = getMessages()
|
||||
count, last, first = getMessages(db)
|
||||
print("Stored %i messages." % count)
|
||||
gained, lost = getFollowers()
|
||||
gained, lost = getFollowers(db)
|
||||
print("Gained %i followers, lost %i." % (gained, lost))
|
||||
gained, lost = getFollowing()
|
||||
gained, lost = getFollowing(db)
|
||||
print("Started following %i, stopped following %i." % (gained, lost))
|
||||
|
|
Loading…
Reference in a new issue