Tarek Ziadé <[email protected]> added the comment:
Added in r80244. This new option willl be available in the next 3.2 release.
Until 3.2 is released, what you can do is catch the errors
and re-raise the ones that are not due to dangling symlinks:
(not tested)
>>> from shutil import copytree, Error
>>> try:
... shutil.copytree('../test', '../test2')
... except Error, e:
... for src, dst, error in e.args[0]:
... if not os.path.islink(src):
... raise
... else:
... linkto = os.readlink(srcname)
... if os.path.exists(linkto):
... raise
... # dangling symlink found.. ignoring..
...
----------
status: open -> closed
versions: +Python 3.2, Python 3.3 -Python 2.6
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue6547>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com