Just use integer mtime if no fractional seconds are found in the search.
authorZac Medico <zmedico@gentoo.org>
Fri, 11 Dec 2009 21:53:23 +0000 (21:53 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 11 Dec 2009 21:53:23 +0000 (21:53 -0000)
svn path=/main/trunk/; revision=15040

pym/portage/__init__.py

index 863af12035a2cafb69638d21afd01bb0ebf558aa..6dfd40b0800b205334a2ac98bb2501e7eeafa14b 100644 (file)
@@ -7697,7 +7697,10 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
                                                                                mtime_str += another_digit
                                                                                digits += 1
                                                                break
-                                               newmtime = float(mtime_str)
+                                               if digits > 0:
+                                                       newmtime = float(mtime_str)
+                                               else:
+                                                       newmtime = int_mtime
 
                                        os.utime(dest, (newmtime, newmtime))
                                newmtime = sstat[stat.ST_MTIME]