From: Aiwota Programmer Date: Tue, 22 Aug 2006 15:27:28 +0000 (+0900) Subject: Prevent from saving an empty .cache file. X-Git-Tag: v0.1~61 X-Git-Url: http://git.sourceforge.jp/view?p=fukui-no-namari%2Ffukui-no-namari.git;a=commitdiff_plain;h=ec2bf657f5c54cf6a90b03857bf5000bdbc95d53;hp=576de1edfbd0569140ace3c834c8d985c87a3005 Prevent from saving an empty .cache file. --- diff --git a/src/Hage1/cachefile.py b/src/Hage1/cachefile.py index 4c5bcdf..901994a 100644 --- a/src/Hage1/cachefile.py +++ b/src/Hage1/cachefile.py @@ -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