Make BinpkgFetcher use longs instead of floats when synchronizing timestamps,
authorZac Medico <zmedico@gentoo.org>
Wed, 24 Dec 2008 22:49:37 +0000 (22:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 24 Dec 2008 22:49:37 +0000 (22:49 -0000)
since it's better not to rely on float comparison here.

svn path=/main/trunk/; revision=12302

pym/_emerge/__init__.py

index c5254a2ab4461f814917135c908fe6e53576d495..cb8078f5df4ca9fee40371984741ac80d27020e8 100644 (file)
@@ -3535,12 +3535,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: