mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-28 12:29:40 +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:
parent
c47066d713
commit
b88ccc292c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user