1
0
mirror of https://github.com/gryf/fs-uae-wrapper.git synced 2025-12-27 00:42:36 +01:00

Make message close method bit more bulletproof

Noe, it it possible to create Message object and perform close() on it,
even if show() wasn't called before. It have a bit more sense since it
should be harmless for closing possibly non existent message.
This commit is contained in:
2016-12-27 20:25:11 +01:00
parent 988784dbf3
commit 124fc2ed9d

View File

@@ -51,9 +51,10 @@ class Message(object):
def close(self):
"""Terminate the process with gui"""
if self._process.is_alive():
self._process.terminate()
self._process.join()
if self._process:
if self._process.is_alive():
self._process.terminate()
self._process.join()
def _spawn(msg):