8b3b1b9096
848123e6-fix-memory-stats-for-shutoff-VM.patch ebcb7c06-fix-exception-when-the-address-is-not-an-IP.patch c4d26d16-fix-VM-polling-on-old-libvirt.patch ac2be796-do-not-throw-exception-if-volume-or-pool-dont-exist.patch 88e18c86-fix-sending-net-removed-signal.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=231
35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
Subject: sshtunnels: fix exception when the address is not an IP
|
|
From: Giuseppe Scrivano gscrivan@redhat.com Wed May 6 12:52:40 2015 +0200
|
|
Date: Wed May 6 21:27:50 2015 +0200:
|
|
Git: ebcb7c064ca5a3afd2ec3a0c8f59328a7f71b009
|
|
|
|
bug introduced with commit a2d453f3e20d103a4767394300c5183fde9a6bb4
|
|
|
|
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1218958
|
|
|
|
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
|
|
|
diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py
|
|
index 53f43be..03e1738 100644
|
|
--- a/virtManager/sshtunnels.py
|
|
+++ b/virtManager/sshtunnels.py
|
|
@@ -48,10 +48,16 @@ class ConnectionInfo(object):
|
|
self._connhost = "127.0.0.1"
|
|
|
|
def _is_listen_localhost(self, host=None):
|
|
- return ipaddr.IPNetwork(host or self.gaddr).is_loopback
|
|
+ try:
|
|
+ return ipaddr.IPNetwork(host or self.gaddr).is_loopback
|
|
+ except:
|
|
+ return False
|
|
|
|
def _is_listen_any(self):
|
|
- return ipaddr.IPNetwork(self.gaddr).is_unspecified
|
|
+ try:
|
|
+ return ipaddr.IPNetwork(self.gaddr).is_unspecified
|
|
+ except:
|
|
+ return False
|
|
|
|
def need_tunnel(self):
|
|
if not self._is_listen_localhost():
|