Fix fake_popen

This commit is contained in:
augustin64 2024-04-12 16:20:25 +02:00
parent db6fa9b6b0
commit 37e8f6f61b
1 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,10 @@ if APP_ROOT is None:
NO_SUBPROCESS = os.getenv("NO_SUBPROCESS") NO_SUBPROCESS = os.getenv("NO_SUBPROCESS")
if NO_SUBPROCESS is not None: 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") print("Faking subprocess calls")