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