From 6c237073120d0781aabed3ad06fe2cfc600b4feb Mon Sep 17 00:00:00 2001 From: Klaas Jan Russcher Date: Fri, 27 May 2022 21:34:35 +0200 Subject: [PATCH] cargo_wrapper.py: added python3 version check for right usage of shutil.move(..) --- cargo_wrapper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cargo_wrapper.py b/cargo_wrapper.py index b81d6f03..75f6fe43 100644 --- a/cargo_wrapper.py +++ b/cargo_wrapper.py @@ -135,4 +135,9 @@ if __name__ == "__main__": dest = uninstalled / P(f).name if dest.exists(): dest.unlink() - shutil.move(f, uninstalled) + # move() takes paths from Python3.9 on + if ((sys.version_info.major >= 3) and (sys.version_info.minor >= 9)): + shutil.move(f, uninstalled) + else: + shutil.move(str(f), str(uninstalled)) +