Skip to content

Commit

Permalink
handle SameFileError
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkobrombin committed May 28, 2022
1 parent bb1e8a7 commit d8cb206
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/backend/managers/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,10 @@ def __step_copy_dll(self, config: dict, step: dict):
if os.path.exists(_dest) and os.path.islink(_dest):
os.unlink(_dest)

shutil.copyfile(_path, _dest)
try:
shutil.copyfile(_path, _dest)
except shutil.SameFileError:
logging.info(f"{_name} already exists at the same version, skipping.")
else:
_name = step.get('file_name')
_dest = os.path.join(dest, _name)
Expand Down

0 comments on commit d8cb206

Please sign in to comment.