1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 03:08:14 +00:00

Add sleep after write to QEMU monitor (to work with new QEMU versions)

This commit is contained in:
Dmitry Shmygov 2014-12-27 12:44:10 +03:00
parent 1f615430ae
commit 9cedb1cc99

View File

@ -27,6 +27,7 @@ import subprocess
import shlex import shlex
import ntpath import ntpath
import telnetlib import telnetlib
import time
from gns3server.config import Config from gns3server.config import Config
from gns3dms.cloud.rackspace_ctrl import get_provider from gns3dms.cloud.rackspace_ctrl import get_provider
@ -912,6 +913,7 @@ class QemuVM(object):
tn = telnetlib.Telnet(self._monitor_host, self._monitor, timeout=timeout) tn = telnetlib.Telnet(self._monitor_host, self._monitor, timeout=timeout)
try: try:
tn.write(command.encode('ascii') + b"\n") tn.write(command.encode('ascii') + b"\n")
time.sleep(0.1)
except OSError as e: except OSError as e:
log.warn("Could not write to QEMU monitor: {}".format(e)) log.warn("Could not write to QEMU monitor: {}".format(e))
tn.close() tn.close()