From: Zac Medico Date: Thu, 24 Dec 2009 04:01:27 +0000 (-0000) Subject: When integer mtime is desired, use stat_obj[stat.ST_MTIME] instead of the X-Git-Tag: v2.1.7.16~8 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=b71611276db87b7ed83791cafe568e89932ec17a;p=portage.git 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. (trunk r15126) svn path=/main/branches/2.1.7/; revision=15138 --- diff --git a/pym/portage/cache/flat_list.py b/pym/portage/cache/flat_list.py index bf465efdb..51231a52a 100644 --- a/pym/portage/cache/flat_list.py +++ b/pym/portage/cache/flat_list.py @@ -48,7 +48,7 @@ class database(fs_template.FsBased): raise cache_errors.CacheCorruption(cpv, e) try: - d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime) + d["_mtime_"] = os.fstat(myf.fileno())[stat.ST_MTIME] except OSError as e: myf.close() raise cache_errors.CacheCorruption(cpv, e)