Message150391
> This is not a "duplicate issue". The openat solution is no easier than the os.open
> solution.
Amaury did not suggest to use openat, but the new opener argument to open, which was especially added for use cases such as the one discussed here:
...
open_exclusive = lambda path, mode: os.open(path, mode|os.O_CREAT|os.O_EXCL))
...
fp = open(filename, 'w', opener=open_exclusive)
...
That’s why this bug was initially closed as duplicate. |
|
Date |
User |
Action |
Args |
2011-12-30 20:59:05 | eric.araujo | set | recipients:
+ eric.araujo, amaury.forgeotdarc, pitrou, vstinner, benjamin.peterson, Devin Jeanpierre, Arfrever, cvrebert, neologix, docs@python, Julian, David.Townshend |
2011-12-30 20:59:05 | eric.araujo | set | messageid: <1325278745.44.0.783137736919.issue12760@psf.upfronthosting.co.za> |
2011-12-30 20:59:04 | eric.araujo | link | issue12760 messages |
2011-12-30 20:59:04 | eric.araujo | create | |
|