summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2011-01-03 20:57:19 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 15:00:07 +0000
commit9ed8e9f37136ee170433effad0ebd4130dc97007 (patch)
tree1f41f8a73592fbbaaedc318e8ffd30b7750caf7d /bitbake/lib/bb/parse
parent0090a798eb868ebc926944eac2e6d4a5aff3e1b3 (diff)
downloadopenembedded-core-9ed8e9f37136ee170433effad0ebd4130dc97007.tar.gz
openembedded-core-9ed8e9f37136ee170433effad0ebd4130dc97007.tar.bz2
openembedded-core-9ed8e9f37136ee170433effad0ebd4130dc97007.tar.xz
openembedded-core-9ed8e9f37136ee170433effad0ebd4130dc97007.zip
parse: Use constants from stat instead of magic numbers
(Bitbake rev: bcabe2dfb587042e139890329ff52d9bb9201cf4) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py
index 7f1562e66..eee8d9cdd 100644
--- a/bitbake/lib/bb/parse/__init__.py
+++ b/bitbake/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
@@ -43,19 +44,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):