Make BinpkgFetcher use longs instead of floats when synchronizing timestamps,
authorZac Medico <zmedico@gentoo.org>
Thu, 25 Dec 2008 01:28:20 +0000 (01:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 25 Dec 2008 01:28:20 +0000 (01:28 -0000)
since it's better not to rely on float comparison here. (trunk r12302)

svn path=/main/branches/2.1.6/; revision=12325

pym/_emerge/__init__.py

index 8b6fa3b24d814c383c3d56936b15678a30dee122..c85b2f97d5f90ece0ab4c6ffc50a77ea534d5526 100644 (file)
@@ -3516,12 +3516,12 @@ class BinpkgFetcher(SpawnProcess):
                                remote_mtime = bintree._remotepkgs[self.pkg.cpv].get("MTIME")
                                if remote_mtime is not None:
                                        try:
-                                               remote_mtime = float(remote_mtime)
+                                               remote_mtime = long(remote_mtime)
                                        except ValueError:
                                                pass
                                        else:
                                                try:
-                                                       local_mtime = os.stat(self.pkg_path).st_mtime
+                                                       local_mtime = long(os.stat(self.pkg_path).st_mtime)
                                                except OSError:
                                                        pass
                                                else: