def copyfolder(src, dst):
try:
shutil.copytree(src, dst)
except FileExistsError as exc:
lecho('Warning', exc, red)
sys.exit(1)
except OSError as exc:
if exc.errno == errno.ENOTDIR:
shutil.copy(src, dst)
else:
raise
文章目录