mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-23 06:16:43 +00:00
update main.py to avoid resource leak
This commit is contained in:
parent
9fa2c464ba
commit
a672421057
2
main.py
2
main.py
@ -469,7 +469,7 @@ class TodoParser(object):
|
|||||||
if not os.path.exists(path) or not os.path.isfile(path):
|
if not os.path.exists(path) or not os.path.isfile(path):
|
||||||
print(f'Cannot retrieve custom language file "{path}".')
|
print(f'Cannot retrieve custom language file "{path}".')
|
||||||
continue
|
continue
|
||||||
f = open(path)
|
with open(path) as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
|
|
||||||
# Iterate through the definitions.
|
# Iterate through the definitions.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user