forked from mirrors/fabulously-optimized
Remove usage of deprecated distutils (#436)
* Remove usage of deprecated distutils * remove unnecessary import
This commit is contained in:
parent
ebc9067011
commit
7d2af597f6
|
@ -1,5 +1,4 @@
|
|||
import os, shutil
|
||||
from distutils import dir_util
|
||||
|
||||
user_path = os.path.expanduser("~")
|
||||
cf_path = user_path + "/curseforge/minecraft/Instances/Fabulously Optimized/"
|
||||
|
@ -12,7 +11,7 @@ packwiz_path = git_path + "Packwiz/" + minecraft_version
|
|||
|
||||
def remove_dir(path, description):
|
||||
if os.path.isdir(path):
|
||||
dir_util.remove_tree(path)
|
||||
shutil.rmtree(path)
|
||||
print("Deleted " + description)
|
||||
else:
|
||||
print("Skipped " + description + " deletion, didn't exist")
|
||||
|
@ -26,7 +25,7 @@ def remove_file(path, description):
|
|||
|
||||
def copy_dir(from_path, to_path, from_desc, to_desc):
|
||||
if os.path.isdir(from_path):
|
||||
dir_util.copy_tree(from_path, to_path)
|
||||
shutil.copytree(from_path, to_path)
|
||||
print("Copied " + from_desc + " to " + to_desc)
|
||||
else:
|
||||
print("Skipped " + from_desc + " copying to " + to_desc + ", didn't exist")
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import os, shutil, re, zipfile
|
||||
from distutils import dir_util
|
||||
|
||||
user_path = os.path.expanduser("~")
|
||||
mmc_path = user_path + "/Documents/MultiMC/instances/Fabulously Optimized/"
|
||||
|
|
Loading…
Reference in a new issue