mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-28 11:18:11 +00:00
Fix tests.
This commit is contained in:
parent
97c68f56bf
commit
8baa480b79
@ -89,6 +89,7 @@ class DockerVM(BaseNode):
|
|||||||
self._console_http_port = console_http_port
|
self._console_http_port = console_http_port
|
||||||
self._console_websocket = None
|
self._console_websocket = None
|
||||||
self._extra_hosts = extra_hosts
|
self._extra_hosts = extra_hosts
|
||||||
|
self._display = None
|
||||||
self._closing = False
|
self._closing = False
|
||||||
|
|
||||||
self._volumes = []
|
self._volumes = []
|
||||||
@ -757,21 +758,20 @@ class DockerVM(BaseNode):
|
|||||||
yield from self._x11vnc_process.wait()
|
yield from self._x11vnc_process.wait()
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
pass
|
pass
|
||||||
self._x11vnc_process = None
|
|
||||||
if self._xvfb_process:
|
if self._xvfb_process:
|
||||||
try:
|
try:
|
||||||
self._xvfb_process.terminate()
|
self._xvfb_process.terminate()
|
||||||
yield from self._xvfb_process.wait()
|
yield from self._xvfb_process.wait()
|
||||||
except ProcessLookupError:
|
except ProcessLookupError:
|
||||||
pass
|
pass
|
||||||
self._xvfb_process = None
|
|
||||||
|
|
||||||
display = "/tmp/.X11-unix/X{}".format(self._display)
|
if self._display:
|
||||||
try:
|
display = "/tmp/.X11-unix/X{}".format(self._display)
|
||||||
if os.path.exists(display):
|
try:
|
||||||
os.remove(display)
|
if os.path.exists(display):
|
||||||
except OSError as e:
|
os.remove(display)
|
||||||
log.warning("Could not remove display {}: {}".format(display, e))
|
except OSError as e:
|
||||||
|
log.warning("Could not remove display {}: {}".format(display, e))
|
||||||
|
|
||||||
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
|
# v – 1/True/true or 0/False/false, Remove the volumes associated to the container. Default false.
|
||||||
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
|
# force - 1/True/true or 0/False/false, Kill then remove the container. Default false.
|
||||||
|
Loading…
Reference in New Issue
Block a user