Merge "Add final newline check for requirements"
This commit is contained in:
commit
3cbfd13c56
@ -43,6 +43,9 @@ class RequirementsList(object):
|
|||||||
if not os.path.exists(fn):
|
if not os.path.exists(fn):
|
||||||
return
|
return
|
||||||
for line in open(fn):
|
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:
|
if '#' in line:
|
||||||
line = line[:line.find('#')]
|
line = line[:line.find('#')]
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user