aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/testing/yatest_common
diff options
context:
space:
mode:
authorv-korovin <v-korovin@yandex-team.ru>2022-02-10 16:46:20 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:20 +0300
commitc4e0c5d2f245076d63ccff1004c755ca0cc5d27b (patch)
tree0c6b0402dc17d5d1beffbe9350d2d6802207e123 /library/python/testing/yatest_common
parentb86334f8eb651237aceaa035bebb519893d6d077 (diff)
downloadydb-c4e0c5d2f245076d63ccff1004c755ca0cc5d27b.tar.gz
Restoring authorship annotation for <v-korovin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/python/testing/yatest_common')
-rw-r--r--library/python/testing/yatest_common/yatest/common/path.py16
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 6fed7dda8a..361f554200 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):