]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-network: Add dirs_exist_ok=True to cp_r() 33091/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 28 May 2024 11:08:23 +0000 (13:08 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 May 2024 10:47:45 +0000 (12:47 +0200)
Let's not fail if directories already exist in cp_r().

test/test-network/systemd-networkd-tests.py

index 07d5f95b34653cdf8fae2181c77635df2312c07d..3636baea6ee5e335c3c135a7092c6b08a34c6998 100755 (executable)
@@ -106,7 +106,7 @@ def cp(src, dst):
     shutil.copy(src, dst)
 
 def cp_r(src, dst):
-    shutil.copytree(src, dst, copy_function=shutil.copy)
+    shutil.copytree(src, dst, copy_function=shutil.copy, dirs_exist_ok=True)
 
 def mkdir_p(path):
     os.makedirs(path, exist_ok=True)