Close file after using it (#59000)
This commit is contained in:
parent
2ed78b650f
commit
9c5b3401ff
1 changed files with 16 additions and 16 deletions
|
@ -90,12 +90,12 @@ def read_docstub(filename):
|
|||
operations like ansible-doc -l.
|
||||
"""
|
||||
|
||||
t_module_data = open(filename, 'r')
|
||||
in_documentation = False
|
||||
capturing = False
|
||||
indent_detection = ''
|
||||
doc_stub = []
|
||||
|
||||
with open(filename, 'r') as t_module_data:
|
||||
for line in t_module_data:
|
||||
if in_documentation:
|
||||
# start capturing the stub until indentation returns
|
||||
|
|
Loading…
Reference in a new issue