From d67fece1b741c0aae609436cd83ac0d2c448092c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 21 Dec 2009 03:03:51 +0000 Subject: When integer mtime is desired, use stat_obj[stat.ST_MTIME] instead of the float st_mtime in order to avoid rounding *up* in some rare cases. svn path=/main/trunk/; revision=15125 --- pym/portage/eclass_cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pym/portage/eclass_cache.py') diff --git a/pym/portage/eclass_cache.py b/pym/portage/eclass_cache.py index 26019400b..39e29d540 100644 --- a/pym/portage/eclass_cache.py +++ b/pym/portage/eclass_cache.py @@ -5,6 +5,7 @@ __all__ = ["cache"] +import stat import sys import warnings from portage.util import normalize_path @@ -95,7 +96,7 @@ class cache(object): if not y.endswith(".eclass"): continue try: - mtime = long(os.stat(os.path.join(x, y)).st_mtime) + mtime = os.stat(os.path.join(x, y))[stat.ST_MTIME] except OSError: continue ys=y[:-eclass_len] -- cgit v1.2.3-1-g7c22