This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Alexander.Dutton
Recipients Alexander.Dutton, eric.araujo, tarek
Date 2011-09-02.13:57:21
SpamBayes Score 5.54334e-13
Marked as misclassified No
Message-id <>
If there are any broken symlinks in the same directory as a when e.g. sdist is run, findall() will fall over when attempting to os.stat() the symlink:

Traceback (most recent call last):
  File "", line 81, in run
  File "/usr/lib/python2.6/distutils/command/", line 144, in run
  File "/usr/lib/python2.6/distutils/command/", line 238, in get_file_list
  File "/usr/lib/python2.6/distutils/", line 47, in findall
    self.allfiles = findall(dir)
  File "/usr/lib/python2.6/distutils/", line 297, in findall
    stat = os.stat(fullname)
OSError: [Errno 2] No such file or directory: 'debian/tmp/usr/share/somepath/somesymlink'

Solutions would include replacing the call to os.stat() with one to os.lstat() (probably backwards-incompatible), or trying one and then the other.

This bug is present in Pythons 2.6.6 (Debian 6.0.2) and 2.7 (Fedora 14).

When attempting to reproduce in Python 3.1.2 (on Fedora) no error was encountered. However, looking at distutils/, the same unadulterated call to os.stat() is present. I'll presume that for whatever reason distutils in Py3.1.2 never has cause to stat my broken symlink.
Date User Action Args
2011-09-02 13:57:23Alexander.Duttonsetrecipients: + Alexander.Dutton, tarek, eric.araujo
2011-09-02 13:57:23Alexander.Duttonsetmessageid: <>
2011-09-02 13:57:22Alexander.Duttonlinkissue12885 messages
2011-09-02 13:57:21Alexander.Duttoncreate