[pp:exec] use 'False' as default for 'start_new_session' to avoid TypeError (#7899)

in Python <= 3.11

* Use False as default instead of None to avoid TypeError
* Update postprocessor tests
This commit is contained in:
cenodis
2025-07-27 09:41:27 +02:00
committed by GitHub
parent c3d385bce0
commit 8b6fffe866
2 changed files with 5 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ class ExecPP(PostProcessor):
if options.get("async", False):
self._exec = self._popen
self.session = None
self.session = False
self.creationflags = 0
if options.get("session"):
if util.WINDOWS:

View File

@@ -211,7 +211,7 @@ class ExecTest(BasePostprocessorTest):
self.pathfmt.filename),
shell=True,
creationflags=0,
start_new_session=None,
start_new_session=False,
)
i.wait.assert_called_once_with()
@@ -235,7 +235,7 @@ class ExecTest(BasePostprocessorTest):
],
shell=False,
creationflags=0,
start_new_session=None,
start_new_session=False,
)
def test_command_many(self):
@@ -260,7 +260,7 @@ class ExecTest(BasePostprocessorTest):
self.pathfmt.filename),
shell=True,
creationflags=0,
start_new_session=None,
start_new_session=False,
),
call(
[
@@ -270,7 +270,7 @@ class ExecTest(BasePostprocessorTest):
],
shell=False,
creationflags=0,
start_new_session=None,
start_new_session=False,
),
])