summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-06-04 14:04:38 +0200
committerRichard Purdie <rpurdie@linux.intel.com>2010-07-02 15:41:35 +0100
commit81d13cbebea319906c69ec25145d579b94411bb8 (patch)
tree13610149845f94cc6f188dd91c54d062a4b13962
parent9d32ff0c87b5cbf420efb0fd8ce5d7182863b634 (diff)
downloadopenembedded-core-81d13cbebea319906c69ec25145d579b94411bb8.tar.gz
openembedded-core-81d13cbebea319906c69ec25145d579b94411bb8.tar.bz2
openembedded-core-81d13cbebea319906c69ec25145d579b94411bb8.zip
cache: use os.path ops instead of stat
(Bitbake rev: 09fe0d403c75229931c10eabc7eecc0dc60058fe) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--bitbake/lib/bb/cache.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index 4848b4105f..33734df940 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -64,10 +64,7 @@ class Cache:
self.cachefile = os.path.join(self.cachedir, "bb_cache.dat")
bb.msg.debug(1, bb.msg.domain.Cache, "Using cache in '%s'" % self.cachedir)
- try:
- os.stat( self.cachedir )
- except OSError:
- bb.mkdirhier( self.cachedir )
+ bb.mkdirhier(self.cachedir)
# If any of configuration.data's dependencies are newer than the
# cache there isn't even any point in loading it...
@@ -92,11 +89,8 @@ class Cache:
bb.msg.note(1, bb.msg.domain.Cache, "Invalid cache found, rebuilding...")
self.depends_cache = {}
else:
- try:
- os.stat( self.cachefile )
+ if os.path.isfile(self.cachefile):
bb.msg.note(1, bb.msg.domain.Cache, "Out of date cache found, rebuilding...")
- except OSError:
- pass
def getVar(self, var, fn, exp = 0):
"""