From d2059ed184cbcb01d92194b9fa299fe643e2ecef Mon Sep 17 00:00:00 2001 From: Marcos Del Sol Vives Date: Fri, 1 Jun 2018 22:27:09 +0200 Subject: [PATCH] Fix ProcessLookupError if process finishes before we kill it (#1126) --- tests/test_inputfile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_inputfile.py b/tests/test_inputfile.py index cdcf49726..82837872e 100644 --- a/tests/test_inputfile.py +++ b/tests/test_inputfile.py @@ -40,4 +40,9 @@ class TestInputFile(object): assert in_file.mimetype == 'image/png' assert in_file.filename == 'image.png' - proc.kill() + try: + proc.kill() + except ProcessLookupError: + # This exception may be thrown if the process has finished before we had the chance + # to kill it. + pass