Message103684
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..
... |
|
Date |
User |
Action |
Args |
2010-04-20 09:07:20 | tarek | set | recipients:
+ tarek, TTimo |
2010-04-20 09:07:18 | tarek | set | messageid: <1271754438.93.0.683494866813.issue6547@psf.upfronthosting.co.za> |
2010-04-20 09:07:17 | tarek | link | issue6547 messages |
2010-04-20 09:07:16 | tarek | create | |
|