Don't hide exceptions in case cache file can't be saved
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 5 Jul 2012 08:17:10 +0000 (10:17 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 5 Jul 2012 08:17:10 +0000 (10:17 +0200)
src/caching_data.py

index 4ee3ac0..0610f7d 100644 (file)
@@ -96,7 +96,9 @@ class CachingData:
 
             os.rename(tmpname, CACHE_FILENAME)
         except:
+            # clean up temporary file
             os.unlink(tmpname)
+            raise
 
         logging.info("Wrote cache file %s", CACHE_FILENAME)