From 2140539c64205f1303a9b9741f37b489c05a495d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sat, 14 Jan 2012 22:19:12 +0100 Subject: [PATCH] Improve error message if netcat can't forward Unix domain sockets 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 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/virtManager/manager.py b/src/virtManager/manager.py index 5e9491f96..c86623625 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"))