From 25312e6e2fa8f640fbfbd61918f6828b864cfccb Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 23 Jun 2023 14:07:17 -0700 Subject: [PATCH] only copy files --- scripts/benchmark.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/benchmark.py b/scripts/benchmark.py index 29e2036c3..8a8da71b0 100644 --- a/scripts/benchmark.py +++ b/scripts/benchmark.py @@ -11,9 +11,7 @@ def create_temp_repo(dirname, tempdir): for item in os.listdir(dirname): s = os.path.join(dirname, item) d = os.path.join(tempdir, item) - if os.path.isdir(s): - shutil.copytree(s, d, False, None) - else: + if os.path.isfile(s): shutil.copy2(s, d) # Copy .docs subdir to tempdir as 'docs' @@ -47,4 +45,5 @@ def main(tempdir): if __name__ == "__main__": # with TemporaryDirectory() as tempdir: tempdir = "tmp.benchmark" + os.mkdir(tempdir) main(tempdir)