Merge "Add final newline check for requirements"

This commit is contained in:
Jenkins 2013-08-24 15:35:08 +00:00 committed by Gerrit Code Review
commit 3cbfd13c56

View File

@ -43,6 +43,9 @@ class RequirementsList(object):
if not os.path.exists(fn):
return
for line in open(fn):
if '\n' not in line:
raise Exception("Requirements file %s does not "
"end with a newline." % fn)
if '#' in line:
line = line[:line.find('#')]
line = line.strip()