From 3c1111c248b11972f5d2316e6d8455b7fa11ccc4 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 28 Nov 2011 19:00:15 -0800 Subject: movefile: remove unused lchown --- pym/portage/util/movefile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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: -- cgit v1.2.3-1-g7c22