diff --git a/examples/7zx.py b/examples/7zx.py index c5bc28b7..edc5c95a 100644 --- a/examples/7zx.py +++ b/examples/7zx.py @@ -77,11 +77,11 @@ def main(): unit="B", unit_scale=True) as tall: for fn, fcomp in zips.items(): md, sd = pty.openpty() - ex = subprocess.Popen( + ex = subprocess.Popen( # nosec cmd7zx + [fn], bufsize=1, stdout=md, # subprocess.PIPE, - stderr=subprocess.STDOUT) # nosec + stderr=subprocess.STDOUT) os.close(sd) with io.open(md, mode="rU", buffering=1) as m: with tqdm(total=sum(fcomp.values()), disable=len(zips) < 2, diff --git a/tests/tests_main.py b/tests/tests_main.py index aa477e5b..56453624 100644 --- a/tests/tests_main.py +++ b/tests/tests_main.py @@ -36,9 +36,9 @@ def test_pipes(): """Test command line pipes""" ls_out = subprocess.check_output(['ls']) # nosec ls = subprocess.Popen(['ls'], stdout=subprocess.PIPE) # nosec - res = subprocess.Popen( + res = subprocess.Popen( # nosec [sys.executable, '-c', 'from tqdm.cli import main; main()'], - stdin=ls.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # nosec + stdin=ls.stdout, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = res.communicate() assert ls.poll() == 0