chromium: close properly

This commit is contained in:
Shiz 2020-05-19 02:22:49 +02:00
parent ab96c7e4b4
commit 22dd367562
1 changed files with 2 additions and 2 deletions

View File

@ -159,12 +159,12 @@ class Chromium:
self.process = await trio.open_process([binary] + base_args + self.args, stderr=subprocess.PIPE)
return self.process
async def close(self):
def close(self):
if not self.process:
return
self.process.terminate()
self.process = None
self.profile_dir.__exit__()
self.profile_dir.__exit__(None, None, None)
self.profile_dir = None
async def connect(self):