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

[minion-cvs] Fail properly when no IP address is configured.



Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.seul.org:/tmp/cvs-serv7540/lib/mixminion

Modified Files:
	ServerInfo.py 
Log Message:
Fail properly when no IP address is configured.

Index: ServerInfo.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/ServerInfo.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- ServerInfo.py	30 Oct 2002 02:29:11 -0000	1.16
+++ ServerInfo.py	30 Oct 2002 02:40:13 -0000	1.17
@@ -440,12 +440,12 @@
 	except socket.error, _:
 	    pass
 
-    if len(ip_set) == 0:
-	raise IPGuessError("No address found")
-
     for ip in ip_set.keys():
 	if ip.startswith("127.") or ip.startswith("0."):
 	    del ip_set[ip]
+
+    if len(ip_set) == 0:
+	raise IPGuessError("No address found")
 
     if len(ip_set) > 1:
 	raise IPGuessError("Multiple addresses found: %s" % (