diff --git a/worker/sri.txt b/worker/sri.txt index 8216bb242c..35559a2236 100644 --- a/worker/sri.txt +++ b/worker/sri.txt @@ -1 +1 @@ -{"__version": 213, "updater.py": "GEDqwD5F16roa/hRFbTNbbUqW/smvbe/4Rcf09O5BIJOAI63wsAVgLEnMtQp1naZ", "worker.py": "dT4tz1DqISrMUZhqlQNV94nvpf6EPVg0ebs118cSJ8gC7C22PetaQjQgA1Ciupm4", "games.py": "LyUiwCAMXllQWLIHsWGZpQpziYGO6dK3jDXzimEFd2ehLLrp5nsSGbl7+AUQTnAa"} +{"__version": 213, "updater.py": "jkqHSdrm3XNEDF2Xck73ZgH3zx6fauZuYlkvYRj1kTaO+qzB/DLQvXy3NTQ0AkRt", "worker.py": "dT4tz1DqISrMUZhqlQNV94nvpf6EPVg0ebs118cSJ8gC7C22PetaQjQgA1Ciupm4", "games.py": "LyUiwCAMXllQWLIHsWGZpQpziYGO6dK3jDXzimEFd2ehLLrp5nsSGbl7+AUQTnAa"} diff --git a/worker/updater.py b/worker/updater.py index ebed0ec9e5..72f973aff4 100644 --- a/worker/updater.py +++ b/worker/updater.py @@ -2,7 +2,6 @@ import shutil import sys from datetime import datetime, timezone -from distutils.dir_util import copy_tree from pathlib import Path from zipfile import ZipFile @@ -57,7 +56,14 @@ def update(restart=True, test=False): sep="", file=sys.stderr, ) - copy_tree(str(worker_src), str(worker_dir)) + if sys.version_info >= (3, 8): + from shutil import copytree + + copytree(worker_src, worker_dir, dirs_exist_ok=True) + else: + from distutils.dir_util import copy_tree + + copy_tree(str(worker_src), str(worker_dir)) else: file_list = os.listdir(worker_src) shutil.rmtree(update_dir)