[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 3/3] Do not assume we can find the IP address of the system in vnc.py



We may not be able to extract the IP address in all cases.

Related: rhbz#783227
---
 pyanaconda/vnc.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py
index 47e42eb..7487711 100644
--- a/pyanaconda/vnc.py
+++ b/pyanaconda/vnc.py
@@ -118,7 +118,7 @@ class VncServer:
         self.name = network.getDefaultHostname(self.anaconda)
         ipstr = self.ip
 
-        if self.ip.find(':') != -1:
+        if self.ip and self.ip.find(':') != -1:
             ipstr = "[%s]" % (self.ip,)
 
         if (self.name is not None) and (not self.name.startswith('localhost')) and (ipstr is not None):
-- 
1.7.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]