mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-26 16:38:53 +01:00
Fix ProcessLookupError if process finishes before we kill it (#1126)
This commit is contained in:
parent
f8a17cddcb
commit
d2059ed184
1 changed files with 6 additions and 1 deletions
|
@ -40,4 +40,9 @@ class TestInputFile(object):
|
||||||
assert in_file.mimetype == 'image/png'
|
assert in_file.mimetype == 'image/png'
|
||||||
assert in_file.filename == '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
|
||||||
|
|
Loading…
Add table
Reference in a new issue