New submission from David Cuddihy: 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. ---------- messages: 185014 nosy: dcuddihy priority: normal severity: normal status: open title: os.getcwd() fails on cifs share type: crash versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17525> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com