summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-20 16:22:08 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-20 16:22:08 +0000
commit8243a08d6d2121e4c1e92201c9d4361df42e5d8f (patch)
tree8885f3b3d554054901d15c7a77bad789a8aa12e8 /pym/portage/dispatch_conf.py
parentUpdate syntax of numbers in some files which were missing in previous commit. (diff)
downloadportage-multirepo-8243a08d6d2121e4c1e92201c9d4361df42e5d8f.tar.gz
portage-multirepo-8243a08d6d2121e4c1e92201c9d4361df42e5d8f.tar.bz2
portage-multirepo-8243a08d6d2121e4c1e92201c9d4361df42e5d8f.zip
Update system imports for compatibility with Python 3.
svn path=/main/trunk/; revision=14294
Diffstat (limited to 'pym/portage/dispatch_conf.py')
-rw-r--r--pym/portage/dispatch_conf.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py
index e18eb34f..971f9eb5 100644
--- a/pym/portage/dispatch_conf.py
+++ b/pym/portage/dispatch_conf.py
@@ -7,7 +7,11 @@
# Library by Wayne Davison <gentoo@blorf.net>, derived from code
# written by Jeremy Wohl (http://igmus.org)
-import os, sys, commands, shutil
+import os, sys, shutil
+try:
+ from subprocess import getoutput as subprocess_getoutput
+except ImportError:
+ from commands import getoutput as subprocess_getoutput
import portage
from portage.localization import _
@@ -110,7 +114,7 @@ def file_archive(archive, curconf, newconf, mrgconf):
# Archive the current config file if it isn't already saved
if os.path.exists(archive) \
- and len(commands.getoutput("diff -aq '%s' '%s'" % (curconf,archive))) != 0:
+ and len(subprocess_getoutput("diff -aq '%s' '%s'" % (curconf,archive))) != 0:
suf = 1
while suf < 9 and os.path.exists(archive + '.' + str(suf)):
suf += 1