diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2010-06-04 14:04:38 +0200 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-06-04 16:27:48 -0700 |
commit | 09fe0d403c75229931c10eabc7eecc0dc60058fe (patch) | |
tree | 0cb189900d29691074261f6add46ee7647cffe56 /lib/bb/cache.py | |
parent | 1cfcbee014478eb129ed382c13622317412b036e (diff) | |
download | bitbake-09fe0d403c75229931c10eabc7eecc0dc60058fe.tar.gz |
cache: use os.path ops instead of stat
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/cache.py')
-rw-r--r-- | lib/bb/cache.py | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/bb/cache.py b/lib/bb/cache.py index 4848b4105..33734df94 100644 --- a/lib/bb/cache.py +++ b/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): """ |