[Zodb-checkins] CVS: Packages/ZConfig - datatypes.py:1.4

Fred L. Drake, Jr. fred@zope.com
Tue, 7 Jan 2003 18:15:15 -0500


Update of /cvs-repository/Packages/ZConfig
In directory cvs.zope.org:/tmp/cvs-serv5137

Modified Files:
	datatypes.py 
Log Message:
Simplify the implementation of SocketAddress.


=== Packages/ZConfig/datatypes.py 1.3 => 1.4 ===
--- Packages/ZConfig/datatypes.py:1.3	Tue Jan  7 18:09:15 2003
+++ Packages/ZConfig/datatypes.py	Tue Jan  7 18:15:11 2003
@@ -179,10 +179,7 @@
         # returns (family, address) tuple
         import socket
         if "/" in s:
-            if hasattr(socket, "AF_UNIX"):
-                self.family = socket.AF_UNIX
-            else:
-                self.family = None
+            self.family = getattr(socket, "AF_UNIX", None)
             self.address = s
         else:
             self.family = socket.AF_INET