diff --git a/main.py b/main.py index 4d4500e..2ed8152 100755 --- a/main.py +++ b/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: