Properly closing all files in Python code
This commit is contained in:
@ -93,6 +93,8 @@ def make_class_list(class_list, columns):
|
||||
s += '\n'
|
||||
f.write(s)
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
def dokuize_text(txt):
|
||||
|
||||
@ -330,6 +332,8 @@ def make_doku_class(node):
|
||||
f.write('\n')
|
||||
f.write(dokuize_text(d.text.strip()))
|
||||
f.write('\n')
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
for file in input_list:
|
||||
|
||||
@ -104,6 +104,7 @@ def make_class_list(class_list, columns):
|
||||
f.write("--+-------+")
|
||||
f.write("\n")
|
||||
|
||||
f.close()
|
||||
|
||||
def rstize_text(text, cclass):
|
||||
# Linebreak + tabs in the XML should become two line breaks unless in a "codeblock"
|
||||
@ -572,6 +573,8 @@ def make_rst_class(node):
|
||||
f.write("\n\n")
|
||||
f.write('\n')
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
file_list = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user