Поправлены логи, fixes #3

This commit is contained in:
Jack Stdin 2016-02-14 00:32:11 +03:00
parent 0dfc3b36ee
commit 83d2b5ea37
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class AoRar:
except:
raise FiasException("Error downloading. Reason : {}".format(format_exc()))
logging.info("Downloaded %d bytes", request.headers['Content-length'])
logging.info("Downloaded %d bytes", int(request.headers['Content-length']))
return local_filename
def get_table_entries(self, file_name, allowed_tables):

View File

@ -39,6 +39,8 @@ class Updater:
rows = db.get_rows('SELECT version FROM "CONFIG" WHERE id=0', True)
assert len(rows) > 0, "Cannot get a version"
return rows[0]['version']
except:
return 0
finally:
db.close()