[virt-tools-list] [PATCH 1/1] Strip whitespace from remote hostname

Dave Allan dallan at redhat.com
Wed Feb 27 01:51:40 UTC 2013


If users accidentally add whitespace to the beginning or end of a hostname their connection will fail, so strip it.

Fixes BZ 818438 - Whitespace in remote connection hostname field is not trimmed
---
 src/virtManager/connect.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/virtManager/connect.py b/src/virtManager/connect.py
index d694477..f3fa95a 100644
--- a/src/virtManager/connect.py
+++ b/src/virtManager/connect.py
@@ -306,7 +306,7 @@ class vmmConnect(vmmGObjectUI):
     def generate_uri(self):
         hv = self.widget("hypervisor").get_active()
         conn = self.widget("connection").get_active()
-        host = self.widget("hostname").child.get_text()
+        host = self.widget("hostname").child.get_text().strip()
         user = self.widget("username-entry").get_text()
         is_remote = self.is_remote()

-- 
1.7.11.7




More information about the virt-tools-list mailing list