[virt-tools-list] [virt-manager PATCH] Improve error message if netcat can't forward Unix domain sockets

Guido Günther agx at sigxcpu.org
Sat Jan 14 21:19:12 UTC 2012


Otherwise the information:

  End of file while reading data: nc: invalid option -- 'U'
  nc -h for help: Input/output error

is hidden in the error detail. See Debian bug:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=614291
---
 src/virtManager/manager.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py
index 5e9491f..c866236 100644
--- a/src/virtManager/manager.py
+++ b/src/virtManager/manager.py
@@ -18,6 +18,7 @@
 # MA 02110-1301 USA.
 #
 
+import re
 import gtk
 
 import virtManager.uihelpers as uihelpers
@@ -653,12 +654,15 @@ class vmmManager(vmmGObjectUI):
               details=details,
               title=_("Virtual Machine Manager Connection Failure"))
         else:
+            hint = ''
+            if re.search(r"nc: .* -- 'U'", details):
+                hint = _("\n - The remote netcat understands the '-U' option")
             self.err.show_err(
             _("Unable to open a connection to the libvirt "
               "management daemon.\n\n" +
               "Libvirt URI is: %s\n\n" % conn.get_uri() +
               "Verify that:\n" +
-              " - The 'libvirtd' daemon has been started\n"),
+              " - The 'libvirtd' daemon has been started") + hint,
               details=details,
               title=_("Virtual Machine Manager Connection Failure"))
 
-- 
1.7.7.3




More information about the virt-tools-list mailing list