From 9f06bccfb848e78d8b3a7bb489c06b42517f0076 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 16 Aug 2013 13:42:12 -0700 Subject: [PATCH] Fix line parsing in requirements check The requirements check script would strip one character from the end of every line without a #, which was a problem if the last line of the file had neither a # or a newline. Change-Id: I89f1114695adc4de6ef95a96cffcf919c88a2ac8 --- .../jenkins/files/slave_scripts/project-requirements-change.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/jenkins/files/slave_scripts/project-requirements-change.py b/modules/jenkins/files/slave_scripts/project-requirements-change.py index 13a18acf1c..25d1c9cf42 100755 --- a/modules/jenkins/files/slave_scripts/project-requirements-change.py +++ b/modules/jenkins/files/slave_scripts/project-requirements-change.py @@ -43,7 +43,8 @@ class RequirementsList(object): if not os.path.exists(fn): return for line in open(fn): - line = line[:line.find('#')] + if '#' in line: + line = line[:line.find('#')] line = line.strip() if (not line or line.startswith('http://tarballs.openstack.org/') or