Skip to content

Commit

Permalink
Use shutil copytree instead of distutils
Browse files Browse the repository at this point in the history
  • Loading branch information
sondreso committed Jan 30, 2024
1 parent 5be26a2 commit 8a30e33
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ert/shared/share/ert/shell_scripts/copy_directory.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
import distutils.dir_util
import os
import shutil
import sys

from make_directory import mkdir
Expand All @@ -18,7 +18,7 @@ def copy_directory(src_path, target_path):
print(f"Copying directory structure {src_path} -> {target_path}")
if os.path.isdir(target_path):
target_path = os.path.join(target_path, src_basename)
distutils.dir_util.copy_tree(src_path, target_path, preserve_times=0)
shutil.copytree(src_path, target_path, dirs_exist_ok=True)
else:
raise IOError(
f"Input argument:'{src_path}' "
Expand Down

0 comments on commit 8a30e33

Please sign in to comment.