diff options
author | v-korovin <v-korovin@yandex-team.ru> | 2022-02-10 16:46:21 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:21 +0300 |
commit | 637de640c39b46c13f29619057a54f4cf3e1241b (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /library/python/testing | |
parent | c4e0c5d2f245076d63ccff1004c755ca0cc5d27b (diff) | |
download | ydb-637de640c39b46c13f29619057a54f4cf3e1241b.tar.gz |
Restoring authorship annotation for <v-korovin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/python/testing')
-rw-r--r-- | library/python/testing/yatest_common/yatest/common/path.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/library/python/testing/yatest_common/yatest/common/path.py b/library/python/testing/yatest_common/yatest/common/path.py index 361f554200..6fed7dda8a 100644 --- a/library/python/testing/yatest_common/yatest/common/path.py +++ b/library/python/testing/yatest_common/yatest/common/path.py @@ -33,7 +33,7 @@ def change_dir(path): os.chdir(old) -def copytree(src, dst, symlinks=False, ignore=None, postprocessing=None): +def copytree(src, dst, symlinks=False, ignore=None, postprocessing=None): ''' Copy an entire directory of files into an existing directory instead of raising Exception what shtuil.copytree does @@ -47,13 +47,13 @@ def copytree(src, dst, symlinks=False, ignore=None, postprocessing=None): shutil.copytree(s, d, symlinks, ignore) else: shutil.copy2(s, d) - if postprocessing: - postprocessing(dst, False) - for root, dirs, files in os.walk(dst): - for path in dirs: - postprocessing(os.path.join(root, path), False) - for path in files: - postprocessing(os.path.join(root, path), True) + if postprocessing: + postprocessing(dst, False) + for root, dirs, files in os.walk(dst): + for path in dirs: + postprocessing(os.path.join(root, path), False) + for path in files: + postprocessing(os.path.join(root, path), True) def get_unique_file_path(dir_path, file_pattern, create_file=True, max_suffix=10000): |