Message103860
$ cat test.py
#!/usr/bin/env python
import os
import stat
dbfile = './testfile.test'
with open(dbfile, 'w') as fh:
print('Opened file for writing')
os.unlink(dbfile)
os.mknod(dbfile, stat.S_IRUSR | stat.S_IWUSR | stat.S_IFREG)
print('Mknod\'ed file')
[cliff@ih ~]$ cd tmp <-- nfs mounted on a 64bit Fedora box
[cliff@ih tmp]$ ~/tmp/test.py
Opened file for writing
Traceback (most recent call last):
File "/home/cliff/tmp/test.py", line 9, in <module>
os.mknod(dbfile, stat.S_IRUSR | stat.S_IWUSR | stat.S_IFREG)
OSError: [Errno 2] No such file or directory
[cliff@ih tmp]$ cd /tmp <-- locally mounted on a HD
[cliff@ih tmp]$ ~/tmp/test.py
Opened file for writing
Mknod'ed file
I think the mknod() call really shouldn't fail if it tries to create an ordinary file that can be created with open() with problems. |
|
Date |
User |
Action |
Args |
2010-04-21 15:57:20 | nikratio | set | recipients:
+ nikratio |
2010-04-21 15:57:19 | nikratio | set | messageid: <1271865439.77.0.481642755955.issue8487@psf.upfronthosting.co.za> |
2010-04-21 15:57:18 | nikratio | link | issue8487 messages |
2010-04-21 15:57:18 | nikratio | create | |
|