mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2025-04-20 19:17:36 +03:00
Add cleanup to avoid having files both in package and main folder
This commit is contained in:
parent
5dd123d6e7
commit
758eeb2d22
@ -38,6 +38,9 @@ class SpanshUpdater():
|
||||
def install(self):
|
||||
if self.zip_downloaded:
|
||||
try:
|
||||
# Cleaning up older versions
|
||||
if os.path.exists(os.path.join(self.plugin_dir, "AutoCompleter.py")):
|
||||
os.remove(os.path.join(self.plugin_dir, "*.py"))
|
||||
with zipfile.ZipFile(self.zip_path, 'r') as zip_ref:
|
||||
zip_ref.extractall(self.plugin_dir)
|
||||
|
||||
@ -45,4 +48,4 @@ class SpanshUpdater():
|
||||
except NameError:
|
||||
exc_type, exc_value, exc_traceback = sys.exc_info()
|
||||
lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
|
||||
sys.stderr.write(''.join('!! ' + line for line in lines))
|
||||
sys.stderr.write(''.join('!! ' + line for line in lines))
|
||||
|
Loading…
x
Reference in New Issue
Block a user