2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-24 18:41:55 +00:00

Avoid deprecation on distutils with newer python

Unfortunately, python 3.6 needs the distutils version, but we should avoid it altogether
by python 3.10, but by 3.10 the shutil.copytree can do it.
This commit is contained in:
Jarrod Johnson 2023-08-17 14:36:38 -04:00
parent c47066d713
commit b88ccc292c

View File

@ -3,7 +3,13 @@ import configparser
import ctypes
import ctypes.util
import datetime
from distutils.dir_util import copy_tree
import inspect
from shutil import copytree as copytree
if 'dirs_exist_ok' in inspect.getargspec(copytree).args:
def copy_tree(src, dst):
copytree(src, dst, dirs_exist_ok=True)
else:
from distutils.dir_util import copy_tree
import glob
import json
import argparse