movefile: remove unused lchown
authorZac Medico <zmedico@gentoo.org>
Tue, 29 Nov 2011 03:00:15 +0000 (19:00 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 29 Nov 2011 03:00:15 +0000 (19:00 -0800)
pym/portage/util/movefile.py

index 995f6e7e9403d347f172c128331a7d937b62fdfc..70ecb6010e63a0cf1f48e42990428b4904672d73 100644 (file)
@@ -197,10 +197,8 @@ def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
                                return None # failure
                try:
                        if didcopy:
-                               if stat.S_ISLNK(sstat[stat.ST_MODE]):
-                                       lchown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
-                               else:
-                                       os.chown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
+                               # didcopy is True only if S_ISREG returned True
+                               os.chown(dest,sstat[stat.ST_UID],sstat[stat.ST_GID])
                                os.chmod(dest, stat.S_IMODE(sstat[stat.ST_MODE])) # Sticky is reset on chown
                                os.unlink(src)
                except SystemExit as e: