From: Zac Medico Date: Tue, 18 Aug 2009 05:12:49 +0000 (-0000) Subject: Use st_* attributes instead of the stat module. X-Git-Tag: v2.2_rc39~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=620ea2ba391be96b74e3d457a18585dac786e2e7;p=portage.git Use st_* attributes instead of the stat module. svn path=/main/trunk/; revision=14082 --- diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py index f9d551ff6..df3134c75 100644 --- a/pym/portage/dispatch_conf.py +++ b/pym/portage/dispatch_conf.py @@ -7,7 +7,6 @@ # Library by Wayne Davison , derived from code # written by Jeremy Wohl (http://igmus.org) -from stat import * import os, sys, commands, shutil import portage @@ -86,8 +85,8 @@ def rcs_archive(archive, curconf, newconf, mrgconf): # This puts the results of the merge into mrgconf. ret = os.system(RCS_MERGE % (archive, mrgconf)) mystat = os.lstat(newconf) - os.chmod(mrgconf, mystat[ST_MODE]) - os.chown(mrgconf, mystat[ST_UID], mystat[ST_GID]) + os.chmod(mrgconf, mystat.st_mode) + os.chown(mrgconf, mystat.st_uid, mystat.st_gid) os.rename(archive, archive + '.dist.new') return ret @@ -137,8 +136,8 @@ def file_archive(archive, curconf, newconf, mrgconf): # This puts the results of the merge into mrgconf. ret = os.system(DIFF3_MERGE % (curconf, archive + '.dist', newconf, mrgconf)) mystat = os.lstat(newconf) - os.chmod(mrgconf, mystat[ST_MODE]) - os.chown(mrgconf, mystat[ST_UID], mystat[ST_GID]) + os.chmod(mrgconf, mystat.st_mode) + os.chown(mrgconf, mystat.st_uid, mystat.st_gid) return ret