Allow --infile missing last newline.

This commit is contained in:
Jim Miller 2016-10-20 14:13:09 -05:00
parent f115d68e52
commit 8a84043d29

View file

@ -217,10 +217,10 @@ def main(argv=None,
if options.infile:
with open(options.infile,"r") as infile:
#print "File exists and is readable"
#fileurls = [line.strip() for line in infile]
for url in infile:
url = url[:url.find('#')].strip()
if '#' in url:
url = url[:url.find('#')].strip()
url = url.strip()
if len(url) > 0:
#print "URL: (%s)"%url
urls.append(url)