Create the output folder if it doesn't pre-exist.

This commit is contained in:
Steven Black 2016-03-12 23:44:23 -05:00
parent ec5178b7a5
commit d67a7bc3be

View File

@ -288,7 +288,7 @@ def removeDupsAndExcl(mergeFile):
os.makedirs(outputPath)
# Another mode is required to read and write the file in Python 3
finalFile = open(os.path.join(outputPath, 'hosts'), 'r+b')
finalFile = open(os.path.join(outputPath, 'hosts'), 'w+')
mergeFile.seek(0) # reset file pointer
hostnames = set()