mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
viewers: Log spice message on error state
This commit is contained in:
parent
6a3b2a68c3
commit
8719acbbd3
@ -556,11 +556,15 @@ class SpiceViewer(Viewer):
|
|||||||
logging.debug("Spice channel received ERROR_AUTH, but a "
|
logging.debug("Spice channel received ERROR_AUTH, but a "
|
||||||
"password is already set. Assuming authentication failed.")
|
"password is already set. Assuming authentication failed.")
|
||||||
self.emit("auth-error", channel.get_error().message, False)
|
self.emit("auth-error", channel.get_error().message, False)
|
||||||
elif event in [SpiceClientGLib.ChannelEvent.ERROR_CONNECT,
|
elif "ERROR" in str(event):
|
||||||
SpiceClientGLib.ChannelEvent.ERROR_IO,
|
# SpiceClientGLib.ChannelEvent.ERROR_CONNECT
|
||||||
SpiceClientGLib.ChannelEvent.ERROR_LINK,
|
# SpiceClientGLib.ChannelEvent.ERROR_IO
|
||||||
SpiceClientGLib.ChannelEvent.ERROR_TLS]:
|
# SpiceClientGLib.ChannelEvent.ERROR_LINK
|
||||||
logging.debug("Spice channel event error: %s", event)
|
# SpiceClientGLib.ChannelEvent.ERROR_TLS
|
||||||
|
error = None
|
||||||
|
if channel.get_error():
|
||||||
|
error = channel.get_error().message
|
||||||
|
logging.debug("Spice channel event=%s message=%s", event, error)
|
||||||
self.emit("disconnected")
|
self.emit("disconnected")
|
||||||
|
|
||||||
def _fd_channel_event_cb(self, channel, event):
|
def _fd_channel_event_cb(self, channel, event):
|
||||||
|
Loading…
Reference in New Issue
Block a user