Message185014
Calls to os.getcwd() can fail if issued from a cifs-mounted directory once any of the files or subdirectories have been changed remotely. To recreate this: on Linux, mount a windows share using the mount.cifs command. cd to the share and run python.
Python 2.7.3 (default, Jul 24 2012, 10:05:38)
[GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2
Type "help", "copyright", "credits" or "license for more information.
>>> import os
>>> print os.getcwd()
/home/user/share
>>> exit()
That works. Now, on the host machine, change a file in the current directory and save it. The unix 'pwd' still works. But now:
>>> import os
>>> print os.getcwd()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: [Errno 2] No such file or directory
>>>
Even though the unix 'pwd' and 'ls' commands still work, so I know my share is still accessible.
If I umount and then remount the share, the problem goes away until a file is changed remotely.
I'm running this on Fedora 17. |
|
Date |
User |
Action |
Args |
2013-03-22 22:12:07 | dcuddihy | set | recipients:
+ dcuddihy |
2013-03-22 22:12:07 | dcuddihy | set | messageid: <1363990327.07.0.260090776617.issue17525@psf.upfronthosting.co.za> |
2013-03-22 22:12:07 | dcuddihy | link | issue17525 messages |
2013-03-22 22:12:06 | dcuddihy | create | |
|