Handled value error
This commit is contained in:
parent
df82337f1f
commit
6c20ea6d0f
6
main.py
6
main.py
|
@ -64,7 +64,10 @@ try:
|
|||
|
||||
# Retrieve last database update timestamp
|
||||
luh = open(glob.conf['default']['outdir'] + '/lastupdate.txt', 'r')
|
||||
lu = int(float(luh.read()))
|
||||
try:
|
||||
lu = int(float(luh.read()))
|
||||
except ValueError:
|
||||
lu = 0
|
||||
luh.close()
|
||||
logging.info("last database update timestamp is %d" % lu)
|
||||
|
||||
|
@ -103,7 +106,6 @@ try:
|
|||
|
||||
# Get a Python-friendly library struct from XML file
|
||||
library = tcparser.getLibrary(cachefile, lu)
|
||||
# TODO: properly handle missing file errors or things like this
|
||||
|
||||
### Get filters to search for books ###
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue