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
21 changes: 12 additions & 9 deletions N2O.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ def debug_print(msg):
append_write = 'a' # append if already exists
else:
append_write = 'w' # make a new file if not

# Save CSV internal links as new .md file
with open(newfilepath, append_write, encoding='utf-8') as tempFile:
[print(line.rstrip(), file=tempFile) for line in mdTitle]
try:
# Save CSV internal links as new .md file
with open(newfilepath, append_write, encoding='utf-8') as tempFile:
[print(line.rstrip(), file=tempFile) for line in mdTitle]
except Exception as e:
print(' !!File Exception!!', new_file_name)


num_link = [0, 0, 0, 0]
Expand All @@ -127,11 +129,12 @@ def debug_print(msg):
append_write = 'a' # append if already exists
else:
append_write = 'w' # make a new file if not

# Save modified content as new .md file
with open(newfilepath, append_write, encoding='utf-8') as tempFile:
[print(line.rstrip(), file=tempFile) for line in mdContent]

try:
# Save modified content as new .md file
with open(newfilepath, append_write, encoding='utf-8') as tempFile:
[print(line.rstrip(), file=tempFile) for line in mdContent]
except Exception as e:
print(' !!File Exception!!', new_file_name)



Expand Down