f4pga/common_modules/generic_script_wrapper: use pathlib.rename instead of shutil.move

Signed-off-by: Unai Martinez-Corral <umartinezcorral@antmicro.com>
This commit is contained in:
Unai Martinez-Corral 2022-08-15 07:39:20 +02:00
parent 5494b5bc62
commit 482dbb854c
1 changed files with 1 additions and 2 deletions

View File

@ -57,7 +57,6 @@ Accepted module parameters:
# TODO: `environment` input kind
from pathlib import Path
from shutil import move as sh_mv
from re import match as re_match, finditer as re_finditer
from f4pga.common import decompose_depname, deep, get_verbosity_level, sub
@ -183,7 +182,7 @@ class GenericScriptWrapperModule(Module):
file = ctx.r_env.resolve(file, final=True)
target = ctx.r_env.resolve(target, final=True)
if target != file:
sh_mv(file, target)
Path(file).rename(target)
def _init_outputs(self, output_defs: 'dict[str, dict[str, str]]'):
self.stdout_target = None