1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-31 21:17:23 +02:00

chore(python open): Refactor open and gzip.open to use context manager (#2203)

Co-authored-by: Hugh Secker-Walker <hsw+miac@hodain.net>
This commit is contained in:
Hugh Secker-Walker
2023-01-15 08:28:43 -05:00
committed by GitHub
parent 57047d96e9
commit 820a39b865
11 changed files with 52 additions and 37 deletions

View File

@@ -76,7 +76,8 @@ for setting in settings:
found = set()
buf = ""
input_lines = list(open(filename))
with open(filename, "r") as f:
input_lines = list(f)
while len(input_lines) > 0:
line = input_lines.pop(0)