OSDN Git Service

Prevent from saving an empty .cache file.
authorAiwota Programmer <aiwotaprog@tetteke.tk>
Tue, 22 Aug 2006 15:27:28 +0000 (00:27 +0900)
committerAiwota Programmer <aiwotaprog@tetteke.tk>
Tue, 22 Aug 2006 15:27:28 +0000 (00:27 +0900)
src/Hage1/cachefile.py

index 4c5bcdf..901994a 100644 (file)
@@ -85,6 +85,10 @@ def save_cache(bbs, board, dic):
     dic: dictionary of thread id and metadata dictionary
     which key is in metadata_namelist
     """
+    # nothing to do if dic is empty
+    if not dic:
+        return
+
     cachefile_path = misc.get_board_cache_path(bbs, board)
 
     # create a directroy where .cache file is if not exists