Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaas Jan Russcher <klaas-jan.russcher@politie.nl>2022-05-27 22:34:35 +0300
committerKlaas Jan Russcher <klaas-jan.russcher@politie.nl>2022-05-27 22:34:35 +0300
commitf3270538118d54f7aad140a5ed00eb8ed203ec88 (patch)
tree2ea753296b491663ecc527e3b35eebf6c72c8eee /cargo_wrapper.py
parentab01fc614301b2be79975a535338037aac209764 (diff)
cargo_wrapper.py: added python3 version check for right usage of shutil.move(..)
Diffstat (limited to 'cargo_wrapper.py')
-rw-r--r--cargo_wrapper.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/cargo_wrapper.py b/cargo_wrapper.py
index b81d6f03c..75f6fe43b 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))
+