[jhbuild] always look in http cache when nonetwork is set



commit 0b8ad4234e479805ffa55edd6a11e183687c1fe7
Author: Frederic Peters <fpeters 0d be>
Date:   Fri Apr 24 11:42:43 2009 +0200

    always look in http cache when nonetwork is set
---
 jhbuild/utils/httpcache.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/jhbuild/utils/httpcache.py b/jhbuild/utils/httpcache.py
index 2ee3c37..0e72f3e 100644
--- a/jhbuild/utils/httpcache.py
+++ b/jhbuild/utils/httpcache.py
@@ -172,7 +172,7 @@ class Cache:
         # is the file cached and not expired?
         self.read_cache()
         entry = self.entries.get(uri)
-        if entry and age != 0:
+        if entry and (age != 0 or nonetwork):
             if (nonetwork or now <= entry.expires):
                 return os.path.join(self.cachedir, entry.local)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]