mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
cli: Ignore virt-viewer checks in test suite
Otherwise we can end up hanging with the default --wait behavior
This commit is contained in:
parent
d70fccd296
commit
4727b31e61
@ -485,18 +485,19 @@ def get_console_cb(guest):
|
||||
logging.debug("No viewer to launch for graphics type '%s'", gtype)
|
||||
return
|
||||
|
||||
try:
|
||||
subprocess.check_output(["virt-viewer", "--version"])
|
||||
except OSError:
|
||||
logging.warn(_("Unable to connect to graphical console: "
|
||||
"virt-viewer not installed. Please install "
|
||||
"the 'virt-viewer' package."))
|
||||
return None
|
||||
if not _in_testsuite():
|
||||
try:
|
||||
subprocess.check_output(["virt-viewer", "--version"])
|
||||
except OSError:
|
||||
logging.warn(_("Unable to connect to graphical console: "
|
||||
"virt-viewer not installed. Please install "
|
||||
"the 'virt-viewer' package."))
|
||||
return None
|
||||
|
||||
if not os.environ.get("DISPLAY", ""):
|
||||
logging.warn(_("Graphics requested but DISPLAY is not set. "
|
||||
"Not running virt-viewer."))
|
||||
return None
|
||||
if not os.environ.get("DISPLAY", ""):
|
||||
logging.warn(_("Graphics requested but DISPLAY is not set. "
|
||||
"Not running virt-viewer."))
|
||||
return None
|
||||
|
||||
return _gfx_console
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user