From 8cbc9ceaf541042727f7931fc617746cbf2bc1d5 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 22 Sep 2006 20:24:06 +0000 Subject: For compatibility with float timestamps in python-2.5, convert st_mtime attributes to long wherever portage expects 1s resolution. svn path=/main/trunk/; revision=4500 --- pym/cache/flat_list.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pym/cache/flat_list.py') diff --git a/pym/cache/flat_list.py b/pym/cache/flat_list.py index 0cd3edb0e..65fe5a781 100644 --- a/pym/cache/flat_list.py +++ b/pym/cache/flat_list.py @@ -35,7 +35,8 @@ class database(fs_template.FsBased): raise KeyError(cpv) raise cache_errors.CacheCorruption(cpv, e) - try: d["_mtime_"] = os.fstat(myf.fileno()).st_mtime + try: + d["_mtime_"] = long(os.fstat(myf.fileno()).st_mtime) except OSError, e: myf.close() raise cache_errors.CacheCorruption(cpv, e) -- cgit v1.2.3-1-g7c22