chromium: close properly
This commit is contained in:
parent
ab96c7e4b4
commit
22dd367562
|
@ -159,12 +159,12 @@ class Chromium:
|
||||||
self.process = await trio.open_process([binary] + base_args + self.args, stderr=subprocess.PIPE)
|
self.process = await trio.open_process([binary] + base_args + self.args, stderr=subprocess.PIPE)
|
||||||
return self.process
|
return self.process
|
||||||
|
|
||||||
async def close(self):
|
def close(self):
|
||||||
if not self.process:
|
if not self.process:
|
||||||
return
|
return
|
||||||
self.process.terminate()
|
self.process.terminate()
|
||||||
self.process = None
|
self.process = None
|
||||||
self.profile_dir.__exit__()
|
self.profile_dir.__exit__(None, None, None)
|
||||||
self.profile_dir = None
|
self.profile_dir = None
|
||||||
|
|
||||||
async def connect(self):
|
async def connect(self):
|
||||||
|
|
Loading…
Reference in New Issue