mirror of
https://github.com/ocrmypdf/OCRmyPDF.git
synced 2025-11-08 13:57:17 +00:00
fix unclosed file warnings. (#710)
Co-authored-by: Jonas Winkler <jonas.winkler@jpwinkler.de>
This commit is contained in:
parent
47ef1914d4
commit
62e5edc72b
@ -77,8 +77,7 @@ def run_polling_stderr(args, *, callback, check=False, env=None, **kwargs):
|
||||
args, env, process_log, text = _fix_process_args(args, env, kwargs)
|
||||
assert text, "Must use text=True"
|
||||
|
||||
proc = Popen(args, env=env, **kwargs)
|
||||
|
||||
with Popen(args, env=env, **kwargs) as proc:
|
||||
lines = []
|
||||
while proc.poll() is None:
|
||||
for msg in iter(proc.stderr.readline, ''):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user