commit: 37e0e67a673286f519a689586087960505898c43
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 1 07:19:49 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb 1 07:19:49 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=37e0e67a
repoman/actions: fix headerstring UnboundLocalError
pym/repoman/actions.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/pym/repoman/actions.py b/pym/repoman/actions.py
index d7f343b..fbcef6e 100644
--- a/pym/repoman/actions.py
+++ b/pym/repoman/actions.py
@@ -566,6 +566,7 @@ class Actions(object):
def thick_manifest(self, myupdates, myheaders, no_expansion, expansion):
+ headerstring = None
if self.vcs_settings.vcs == 'cvs':
headerstring = "'\$(Header|Id).*\$'"
elif self.vcs_settings.vcs == "svn":
@@ -606,10 +607,11 @@ class Actions(object):
headerstring = "'\$(%s).*\$'" %
"|".join(enabled_keywords)
- myout = repoman_getstatusoutput(
- "egrep -q %s %s" % (headerstring,
portage._shell_quote(myfile)))
- if myout[0] == 0:
- myheaders.append(myfile)
+ if headerstring is not None:
+ myout = repoman_getstatusoutput(
+ "egrep -q %s %s" % (headerstring,
portage._shell_quote(myfile)))
+ if myout[0] == 0:
+ myheaders.append(myfile)
print("%s have headers that will change." %
green(str(len(myheaders))))
print(