Fixed commit statement

This commit is contained in:
Klaus-Uwe Mitterer 2015-03-18 21:27:17 +01:00
parent 7bde1b84e4
commit 3c63c1bcaf

View file

@ -42,12 +42,13 @@ while True:
comment = HTMLParser.HTMLParser().unescape(text.split("-")[1])
else:
date = dateutil.parser.parse(text)
comment = ""
except ValueError:
api.update_status("@%s Sorry, ich verstehe deinen Tweet nicht... :(" % sender, twid)
continue
cur.execute("INSERT INTO tweets VALUES(%i,'%s','%s','%s')" % (twid,date.strftime("%Y-%m-%dT%H:%M:%S"),sender,comment))
cur.commit
cur.commit()
savepoint = twid
time.sleep(60)