Before comparing os.uname() to BeOS check that os.uname actually exists:-)
diff --git a/Lib/socket.py b/Lib/socket.py
index e5180b5..b28de1d 100644
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -42,7 +42,7 @@
 import os, sys
 
 if (sys.platform.lower().startswith("win")
-    or os.uname()[0] == "BeOS"):
+    or (hasattr(os, 'uname') and os.uname()[0] == "BeOS")):
 
     # be sure this happens only once, even in the face of reload():
     try: