[util] use function for custom Popen

instead of an entire class with inheritance
This commit is contained in:
Mike Fährmann
2026-01-17 20:44:07 +01:00
parent 235fb25f6b
commit 90cd23e279

View File

@@ -762,10 +762,9 @@ if EXECUTABLE and hasattr(sys, "_MEIPASS"):
del orig
class Popen(subprocess.Popen):
def __init__(self, args, **kwargs):
kwargs["env"] = _popen_env
subprocess.Popen.__init__(self, args, **kwargs)
def Popen(args, **kwargs):
kwargs["env"] = _popen_env
return subprocess.Popen(args, **kwargs)
else:
Popen = subprocess.Popen