Blame SOURCES/virt-manager-console-Fix-console_active-logic.patch

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