From 7bba25587967a5aa0c9f32933bc2a9b59f83bb24 Mon Sep 17 00:00:00 2001 From: Ofer Koren Date: Wed, 2 Feb 2022 17:27:52 +0200 Subject: [PATCH] Revert "exceptions: fix ProcessExecutionError creating recursion errors" This reverts commit 32e314cb7749c5efaf57739dde8c701b4e5392a6. --- plumbum/commands/processes.py | 2 +- tests/test_local.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/plumbum/commands/processes.py b/plumbum/commands/processes.py index 0b764cab0..445d0611e 100644 --- a/plumbum/commands/processes.py +++ b/plumbum/commands/processes.py @@ -114,7 +114,7 @@ class ProcessExecutionError(EnvironmentError): """ def __init__(self, argv, retcode, stdout, stderr, message=None): - super().__init__(argv, retcode, stdout, stderr) + super().__init__(self, argv, retcode, stdout, stderr) self.message = message self.argv = argv self.retcode = retcode diff --git a/tests/test_local.py b/tests/test_local.py index fedcd833e..27c9439aa 100644 --- a/tests/test_local.py +++ b/tests/test_local.py @@ -724,11 +724,6 @@ def test_quoting(self): ls("-a", "") # check that empty strings are rendered correctly assert execinfo.value.argv[-2:] == ["-a", ""] - def test_exceptions(self): - with pytest.raises(ProcessExecutionError) as exc_info: - local.cmd.false() - assert repr(exc_info.value) == "ProcessExecutionError(['/usr/bin/false'], 1)" - def test_tempdir(self): with local.tempdir() as dir: assert dir.is_dir()