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