From: Zac Medico Date: Tue, 29 Nov 2011 03:00:15 +0000 (-0800) Subject: movefile: remove unused lchown X-Git-Tag: v2.2.0_alpha80~87 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c1111c248b11972f5d2316e6d8455b7fa11ccc4;p=portage.git movefile: remove unused lchown --- diff --git a/pym/portage/util/movefile.py b/pym/portage/util/movefile.py index 995f6e7e9..70ecb6010 100644 --- a/pym/portage/util/movefile.py +++ b/pym/portage/util/movefile.py @@ -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: