From 913c5bf4c52f9b5e32cbc6f9e43bb05c603b6f3b Mon Sep 17 00:00:00 2001 From: LMBishop <13875753+LMBishop@users.noreply.github.com> Date: Sun, 20 Nov 2022 21:00:00 +0000 Subject: Allow duplicate file in do_link --- util/runners.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util') diff --git a/util/runners.py b/util/runners.py index 9252d86..63a3f3d 100644 --- a/util/runners.py +++ b/util/runners.py @@ -25,5 +25,10 @@ def do_link(source, destination): print(f"Linking {source} -> {destination}") try: os.link(source, destination) + except OSError as e: + if e.errno == 17: + print(f"File {destination} already exists") + else: + raise StepFailedError("Link raised exeption: " + str(e)) from e except Exception as e: raise StepFailedError("Link raised exeption: " + str(e)) from e -- cgit v1.2.3-70-g09d2