aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-20 11:08:30 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2009-09-20 11:08:30 +0000
commit15b8a5bbdf3fb81edc6eac707bd2bd78d54394cf (patch)
treedbb60d5bbf670f1872539fca80263f17352f5c26 /pym/portage/dispatch_conf.py
parentUpdate syntax of 'except' statements for compatibility with Python 3. (diff)
downloadportage-15b8a5bbdf3fb81edc6eac707bd2bd78d54394cf.tar.gz
portage-15b8a5bbdf3fb81edc6eac707bd2bd78d54394cf.tar.bz2
portage-15b8a5bbdf3fb81edc6eac707bd2bd78d54394cf.zip
Update syntax of calls to print() for compatibility with Python 3.
(2to3-3.1 -f print -nw ${FILES}) svn path=/main/trunk/; revision=14290
Diffstat (limited to 'pym/portage/dispatch_conf.py')
-rw-r--r--pym/portage/dispatch_conf.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py
index e9b220a39..e18eb34fa 100644
--- a/pym/portage/dispatch_conf.py
+++ b/pym/portage/dispatch_conf.py
@@ -25,7 +25,7 @@ def read_config(mandatory_opts):
'/etc/dispatch-conf.conf', None)
opts, errors = loader.load()
if not opts:
- print >> sys.stderr, _('dispatch-conf: Error reading /etc/dispatch-conf.conf; fatal')
+ print(_('dispatch-conf: Error reading /etc/dispatch-conf.conf; fatal'), file=sys.stderr)
sys.exit(1)
# Handle quote removal here, since KeyValuePairFileLoader doesn't do that.
@@ -39,12 +39,12 @@ def read_config(mandatory_opts):
if key == "merge":
opts["merge"] = "sdiff --suppress-common-lines --output='%s' '%s' '%s'"
else:
- print >> sys.stderr, _('dispatch-conf: Missing option "%s" in /etc/dispatch-conf.conf; fatal') % (key,)
+ print(_('dispatch-conf: Missing option "%s" in /etc/dispatch-conf.conf; fatal') % (key,), file=sys.stderr)
if not os.path.exists(opts['archive-dir']):
os.mkdir(opts['archive-dir'])
elif not os.path.isdir(opts['archive-dir']):
- print >> sys.stderr, _('dispatch-conf: Config archive dir [%s] must exist; fatal') % (opts['archive-dir'],)
+ print(_('dispatch-conf: Config archive dir [%s] must exist; fatal') % (opts['archive-dir'],), file=sys.stderr)
sys.exit(1)
return opts
@@ -65,8 +65,8 @@ def rcs_archive(archive, curconf, newconf, mrgconf):
try:
shutil.copy2(curconf, archive)
except(IOError, os.error) as why:
- print >> sys.stderr, _('dispatch-conf: Error copying %(curconf)s to %(archive)s: %(reason)s; fatal') % \
- {"curconf": curconf, "archive": archive, "reason": str(why)}
+ print(_('dispatch-conf: Error copying %(curconf)s to %(archive)s: %(reason)s; fatal') % \
+ {"curconf": curconf, "archive": archive, "reason": str(why)}, file=sys.stderr)
if os.path.exists(archive + ',v'):
os.system(RCS_LOCK + ' ' + archive)
os.system(RCS_PUT + ' ' + archive)
@@ -81,8 +81,8 @@ def rcs_archive(archive, curconf, newconf, mrgconf):
try:
shutil.copy2(newconf, archive)
except(IOError, os.error) as why:
- print >> sys.stderr, _('dispatch-conf: Error copying %(newconf)s to %(archive)s: %(reason)s; fatal') % \
- {"newconf": newconf, "archive": archive, "reason": str(why)}
+ print(_('dispatch-conf: Error copying %(newconf)s to %(archive)s: %(reason)s; fatal') % \
+ {"newconf": newconf, "archive": archive, "reason": str(why)}, file=sys.stderr)
if has_branch:
if mrgconf != '':
@@ -124,16 +124,16 @@ def file_archive(archive, curconf, newconf, mrgconf):
try:
shutil.copy2(curconf, archive)
except(IOError, os.error) as why:
- print >> sys.stderr, _('dispatch-conf: Error copying %(curconf)s to %(archive)s: %(reason)s; fatal') % \
- {"curconf": curconf, "archive": archive, "reason": str(why)}
+ print(_('dispatch-conf: Error copying %(curconf)s to %(archive)s: %(reason)s; fatal') % \
+ {"curconf": curconf, "archive": archive, "reason": str(why)}, file=sys.stderr)
if newconf != '':
# Save off new config file in the archive dir with .dist.new suffix
try:
shutil.copy2(newconf, archive + '.dist.new')
except(IOError, os.error) as why:
- print >> sys.stderr, _('dispatch-conf: Error copying %(newconf)s to %(archive)s: %(reason)s; fatal') % \
- {"newconf": newconf, "archive": archive + '.dist.new', "reason": str(why)}
+ print(_('dispatch-conf: Error copying %(newconf)s to %(archive)s: %(reason)s; fatal') % \
+ {"newconf": newconf, "archive": archive + '.dist.new', "reason": str(why)}, file=sys.stderr)
ret = 0
if mrgconf != '' and os.path.exists(archive + '.dist'):