diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-12-21 03:03:51 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-12-21 03:03:51 +0000 |
commit | d67fece1b741c0aae609436cd83ac0d2c448092c (patch) | |
tree | 60b4f0767576d86780dbcd93aa3095c82f6b7e62 /pym/_emerge/main.py | |
parent | c4ac4de2264b51d182412dfb4dada548b2e05e5e (diff) | |
download | portage-d67fece1b741c0aae609436cd83ac0d2c448092c.tar.gz portage-d67fece1b741c0aae609436cd83ac0d2c448092c.tar.bz2 portage-d67fece1b741c0aae609436cd83ac0d2c448092c.zip |
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
Diffstat (limited to 'pym/_emerge/main.py')
-rw-r--r-- | pym/_emerge/main.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index f1da3bd5f..98b8478a8 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -6,6 +6,7 @@ from __future__ import print_function import logging import signal +import stat import sys import textwrap import platform @@ -106,7 +107,7 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval): continue inforoot=normpath(root+z) if os.path.isdir(inforoot): - infomtime = long(os.stat(inforoot).st_mtime) + infomtime = os.stat(inforoot)[stat.ST_MTIME] if inforoot not in prev_mtimes or \ prev_mtimes[inforoot] != infomtime: regen_infodirs.append(inforoot) @@ -196,7 +197,7 @@ def chk_updated_info_files(root, infodirs, prev_mtimes, retval): del e #update mtime so we can potentially avoid regenerating. - prev_mtimes[inforoot] = long(os.stat(inforoot).st_mtime) + prev_mtimes[inforoot] = os.stat(inforoot)[stat.ST_MTIME] if badcount: out.eerror("Processed %d info files; %d errors." % \ |