diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2011-01-03 20:57:19 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-04 14:55:58 +0000 |
commit | bcabe2dfb587042e139890329ff52d9bb9201cf4 (patch) | |
tree | 24d0c3b56a6b4897a1c601135fceccca139b2635 /lib/bb/parse/__init__.py | |
parent | 5ec4ca7e45bdf6d259503fc67155395e89ba6329 (diff) | |
download | bitbake-contrib-bcabe2dfb587042e139890329ff52d9bb9201cf4.tar.gz |
parse: Use constants from stat instead of magic numbers
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'lib/bb/parse/__init__.py')
-rw-r--r-- | lib/bb/parse/__init__.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py index 3015d0c8d..264d00996 100644 --- a/lib/bb/parse/__init__.py +++ b/lib/bb/parse/__init__.py @@ -27,6 +27,7 @@ File parsers for the BitBake build tools. handlers = [] import os +import stat import logging import bb import bb.utils @@ -42,19 +43,19 @@ class SkipPackage(Exception): __mtime_cache = {} def cached_mtime(f): if f not in __mtime_cache: - __mtime_cache[f] = os.stat(f)[8] + __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] return __mtime_cache[f] def cached_mtime_noerror(f): if f not in __mtime_cache: try: - __mtime_cache[f] = os.stat(f)[8] + __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] except OSError: return 0 return __mtime_cache[f] def update_mtime(f): - __mtime_cache[f] = os.stat(f)[8] + __mtime_cache[f] = os.stat(f)[stat.ST_MTIME] return __mtime_cache[f] def mark_dependency(d, f): |