[Collab-qa-commits] r1074 - upload-history

filippo at alioth.debian.org filippo at alioth.debian.org
Mon Aug 11 16:20:33 UTC 2008


Author: filippo
Date: 2008-08-11 16:20:33 +0000 (Mon, 11 Aug 2008)
New Revision: 1074

Modified:
   upload-history/munge_ddc.py
Log:
finish checks for NO_CACHE env

Modified: upload-history/munge_ddc.py
===================================================================
--- upload-history/munge_ddc.py	2008-08-11 15:59:46 UTC (rev 1073)
+++ upload-history/munge_ddc.py	2008-08-11 16:20:33 UTC (rev 1074)
@@ -82,7 +82,7 @@
     
     mb = mailbox.PortableUnixMailbox(file(mb_file), factory=email.message_from_file)
 
-    if os.path.exists(msgid_cache):
+    if os.path.exists(msgid_cache) and not os.environ.has_key('NO_CACHE'):
         m_cache = cPickle.load(open(msgid_cache))
     else:
         m_cache = {}
@@ -148,7 +148,8 @@
         # separate different packages
         print
 
-    cPickle.dump(m_cache, open(msgid_cache, "w"), 2)
+    if not os.environ.has_key('NO_CACHE'):
+        cPickle.dump(m_cache, open(msgid_cache, "w"), 2)
 
 if __name__ == '__main__':
     if len(sys.argv) < 2:




More information about the Collab-qa-commits mailing list