summaryrefslogtreecommitdiffstats
path: root/bin/egencache
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-01-14 09:01:38 -0800
committerZac Medico <zmedico@gentoo.org>2012-01-14 09:01:38 -0800
commitee42bbb989cb31b0af76b6ae53ab238954a6f14e (patch)
treedad3fdd186672a90d3f68efd76ddcbdbd94538ba /bin/egencache
parent93b654199a32fc3df1299b030317720b9294b0c3 (diff)
downloadportage-ee42bbb989cb31b0af76b6ae53ab238954a6f14e.tar.gz
portage-ee42bbb989cb31b0af76b6ae53ab238954a6f14e.tar.bz2
portage-ee42bbb989cb31b0af76b6ae53ab238954a6f14e.zip
egencache: use textwrap.dedent
Diffstat (limited to 'bin/egencache')
-rwxr-xr-xbin/egencache20
1 files changed, 10 insertions, 10 deletions
diff --git a/bin/egencache b/bin/egencache
index 7a87bb62c..2f81966c6 100755
--- a/bin/egencache
+++ b/bin/egencache
@@ -503,12 +503,12 @@ class GenUseLocalDesc(object):
errors='backslashreplace')
output.write(_unicode_decode('\n'))
else:
- output.write(_unicode_decode('''
-# This file is deprecated as per GLEP 56 in favor of metadata.xml. Please add
-# your descriptions to your package's metadata.xml ONLY.
-# * generated automatically using egencache *
+ output.write(textwrap.dedent(_unicode_decode('''
+ # This file is deprecated as per GLEP 56 in favor of metadata.xml. Please add
+ # your descriptions to your package's metadata.xml ONLY.
+ # * generated automatically using egencache *
-'''.lstrip()))
+ '''.lstrip())))
# The cmp function no longer exists in python3, so we'll
# implement our own here under a slightly different name
@@ -690,12 +690,12 @@ class GenChangeLogs(object):
self.returncode |= 2
return
- output.write(_unicode_decode('''
-# ChangeLog for %s
-# Copyright 1999-%s Gentoo Foundation; Distributed under the GPL v2
-# $Header: $
+ output.write(textwrap.dedent(_unicode_decode('''
+ # ChangeLog for %s
+ # Copyright 1999-%s Gentoo Foundation; Distributed under the GPL v2
+ # $Header: $
-''' % (cp, time.strftime('%Y'))).lstrip())
+ ''' % (cp, time.strftime('%Y'))).lstrip()))
# now grab all the commits
commits = self.grab(['git', 'rev-list', 'HEAD', '--', '.']).split()