Use stat st_dev attributes instead of the older approach. (trunk r12117) v2.1.6_rc2
authorZac Medico <zmedico@gentoo.org>
Thu, 27 Nov 2008 02:36:41 +0000 (02:36 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 27 Nov 2008 02:36:41 +0000 (02:36 -0000)
svn path=/main/branches/2.1.6/; revision=12118

pym/portage/__init__.py

index 862e50f1801ce8b26049c111508b43d93a4bdd1a..9beb068c3f1d8df745ed4c533ea1dfc06c924eea 100644 (file)
@@ -6071,8 +6071,7 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
        renamefailed=1
        if hardlinked:
                renamefailed = False
-       if not hardlinked and \
-               (selinux_enabled or sstat[stat.ST_DEV] == dstat[stat.ST_DEV]):
+       if not hardlinked and (selinux_enabled or sstat.st_dev == dstat.st_dev):
                try:
                        if selinux_enabled:
                                ret=selinux.secure_rename(src,dest)