summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-18 05:12:49 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-18 05:12:49 +0000
commit620ea2ba391be96b74e3d457a18585dac786e2e7 (patch)
treeedc52933c37d7a306c3b52c59a495842907a06b2
parentd5a9a9948d75ee5ae6d4a63cef0471d65f95433c (diff)
downloadportage-620ea2ba391be96b74e3d457a18585dac786e2e7.tar.gz
portage-620ea2ba391be96b74e3d457a18585dac786e2e7.tar.bz2
portage-620ea2ba391be96b74e3d457a18585dac786e2e7.zip
Use st_* attributes instead of the stat module.
svn path=/main/trunk/; revision=14082
-rw-r--r--pym/portage/dispatch_conf.py9
1 files changed, 4 insertions, 5 deletions
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 <gentoo@blorf.net>, 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