Steve Dower added the comment:

That was actually my first hack and it also works. The fundamental problem here 
is that GetLastError() is not actually meant to indicate *whether* an error has 
occurred, but when one has occurred it describes what it was.

Indeed, in this case no error has occurred - CreateFileMapping was called and 
there is a file mapping available. OpenFileMapping is provided if an error is 
required when the mapping does not already exist.

The best option is definitely a separate method (or parameter) on mmap to 
open/raise rather than open/create. I may just comment out the assertion with a 
reference to this bug in the meantime, so that the buildbots aren't getting 
stuck every time.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23060>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to