diff options
| author | Ned Deily <nad@python.org> | 2019-08-29 17:20:03 -0400 |
|---|---|---|
| committer | Ćukasz Langa <lukasz@langa.pl> | 2019-08-29 23:20:03 +0200 |
| commit | 7fcc2088a50a4ecb80e5644cd195bee209c9f979 (patch) | |
| tree | 5e1c7d85519d76fbb38effed639d32cc78e87f2e /Lib/shutil.py | |
| parent | e278335a6eb049e6028db9a8dcb8baac6cb365ee (diff) | |
| download | cpython-git-7fcc2088a50a4ecb80e5644cd195bee209c9f979.tar.gz | |
bpo-37834: Prevent shutil.rmtree exception (GH-15602)
when built on non-Windows system without fd system call support,
like older versions of macOS.
Diffstat (limited to 'Lib/shutil.py')
| -rw-r--r-- | Lib/shutil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index 39f793b5f3..561ad71508 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -544,7 +544,7 @@ def copytree(src, dst, symlinks=False, ignore=None, copy_function=copy2, ignore_dangling_symlinks=ignore_dangling_symlinks, dirs_exist_ok=dirs_exist_ok) -if hasattr(stat, 'FILE_ATTRIBUTE_REPARSE_POINT'): +if hasattr(os.stat_result, 'st_file_attributes'): # Special handling for directory junctions to make them behave like # symlinks for shutil.rmtree, since in general they do not appear as # regular links. |
