Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions atarashi/libs/commentPreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,15 @@ def extract(inputFile):
with open(outputFile, 'w') as outFile:
# if the file extension is supported
if fileType in supportedFileExtensions:
data_file = commentExtract(inputFile)
data = licenseComment(data_file)
outFile.write(data)
try:
data_file = commentExtract(inputFile)
data = licenseComment(data_file)
outFile.write(data)
except Exception:
with open(inputFile) as inFile:
lines = inFile.read().split('\n')
for line in lines:
outFile.write(line + '\n')
else:
# if file extension is not supported
with open(inputFile) as inFile:
Expand Down