From 37e8f6f61bf1818cdcac7527d940564bce7007b8 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Fri, 12 Apr 2024 16:20:25 +0200 Subject: [PATCH] Fix fake_popen --- Flask/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Flask/app.py b/Flask/app.py index 7792f73..54a377f 100644 --- a/Flask/app.py +++ b/Flask/app.py @@ -19,7 +19,10 @@ if APP_ROOT is None: NO_SUBPROCESS = os.getenv("NO_SUBPROCESS") if NO_SUBPROCESS is not None: - subprocess.Popen = lambda x: print("Calling subprocess.Popen with", x) + def fake_popen(*args, **kwargs): + print("Calling subprocess.Popen with", args, kwargs) + + subprocess.Popen = fake_popen print("Faking subprocess calls")