From ac9ee60000c4ea83974d80db611560b79acf2ec6 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Tue, 3 Dec 2013 16:38:54 +0100 Subject: [RHEL-7.0 virt-manager PATCH] console: Fix console_active() logic https://bugzilla.redhat.com/show_bug.cgi?id=947020 (cherry picked from commit 79196cdfcf8f2ac58c87074c326ca3237f84dca6) Conflicts: virtManager/console.py -- context Signed-off-by: Martin Kletzander --- virtManager/console.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/virtManager/console.py b/virtManager/console.py index 4085be0..eecafc7 100644 --- a/virtManager/console.py +++ b/virtManager/console.py @@ -96,9 +96,9 @@ class ConnectionInfo(object): def console_active(self): if self.gsocket: return True - if not self.gport: + if (self.gport in [None, -1] and self.gtlsport in [None, -1]): return False - return int(self.gport) == -1 + return True class Tunnel(object): @@ -1202,7 +1202,7 @@ class vmmConsolePages(vmmGObjectUI): self.activate_unavailable_page(msg) return - if ginfo.console_active(): + if not ginfo.console_active(): self.activate_unavailable_page( _("Graphical console is not yet active for guest")) self.schedule_retry() -- 1.8.5.1