autotest: removed deprecated distutils
prevent deprecation warning
This commit is contained in:
parent
e142747d1f
commit
3a725ad1b0
@ -10,11 +10,6 @@ from __future__ import print_function
|
|||||||
import atexit
|
import atexit
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import copy
|
import copy
|
||||||
try:
|
|
||||||
import distutils.dir_util
|
|
||||||
except ImportError:
|
|
||||||
# we copy with this with try/except in copy_tree, below
|
|
||||||
pass
|
|
||||||
import glob
|
import glob
|
||||||
import optparse
|
import optparse
|
||||||
import os
|
import os
|
||||||
@ -666,9 +661,6 @@ class TestResults(object):
|
|||||||
|
|
||||||
|
|
||||||
def copy_tree(f, t, dirs_exist_ok=False):
|
def copy_tree(f, t, dirs_exist_ok=False):
|
||||||
try:
|
|
||||||
distutils.dir_util.copy_tree(f, t)
|
|
||||||
except Exception:
|
|
||||||
shutil.copytree(f, t, dirs_exist_ok=dirs_exist_ok)
|
shutil.copytree(f, t, dirs_exist_ok=dirs_exist_ok)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user