Don't try to commit if no db connection

This commit is contained in:
shortcutme 2019-11-19 02:08:30 +01:00
parent 39352eb97e
commit 96e7fbdca1
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -114,6 +114,10 @@ class Db(object):
self.log.debug("Commit ignored: Progress sleeping")
return False
if not self.conn:
self.log.debug("Commit ignored: No connection")
return False
try:
s = time.time()
self.conn.commit()