Changeset: 5983d32dd71b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5983d32dd71b
Modified Files:
        python/monetdb/mapi2.py
        python/monetdb/mapi3.py
Branch: Oct2010
Log Message:

Not only doesn't Windows support MSG_WAITALL, it also doesn't like None.
Also use a feature test to determine whether MSG_WAITALL is supported.


diffs (32 lines):

diff -r 58f8cb504db9 -r 5983d32dd71b python/monetdb/mapi2.py
--- a/python/monetdb/mapi2.py   Tue Sep 21 16:34:52 2010 +0200
+++ b/python/monetdb/mapi2.py   Wed Sep 22 09:47:17 2010 +0200
@@ -31,9 +31,9 @@
 
 from monetdb.monetdb_exceptions import *
 
-# windows doesn't support MSG_WAITALL flag for recv
-flags = None
-if platform.system() != 'Windows':
+# Windows doesn't support MSG_WAITALL flag for recv
+flags = 0
+if hasattr(socket, 'MSG_WAITALL'):
     flags = socket.MSG_WAITALL
 
 logger = logging.getLogger("monetdb")
diff -r 58f8cb504db9 -r 5983d32dd71b python/monetdb/mapi3.py
--- a/python/monetdb/mapi3.py   Tue Sep 21 16:34:52 2010 +0200
+++ b/python/monetdb/mapi3.py   Wed Sep 22 09:47:17 2010 +0200
@@ -31,9 +31,9 @@
 
 from monetdb.monetdb_exceptions import *
 
-# windows doesn't support MSG_WAITALL flag for recv
-flags = None
-if platform.system() != 'Windows':
+# Windows doesn't support MSG_WAITALL flag for recv
+flags = 0
+if hasattr(socket, 'MSG_WAITALL'):
     flags = socket.MSG_WAITALL
 
 logger = logging.getLogger("monetdb")
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to