fix _uninstall()
This commit is contained in:
parent
a449430500
commit
70940b8573
@ -127,7 +127,7 @@ class Bundle:
|
|||||||
zip.write(filename, os.path.join(base_dir, filename))
|
zip.write(filename, os.path.join(base_dir, filename))
|
||||||
zip.close()
|
zip.close()
|
||||||
|
|
||||||
def remove(self):
|
def _uninstall(self):
|
||||||
ext = os.path.splitext(self._path)[1]
|
ext = os.path.splitext(self._path)[1]
|
||||||
if self._unpacked:
|
if self._unpacked:
|
||||||
if not os.path.isdir(self._path) or ext != self._unzipped_extension:
|
if not os.path.isdir(self._path) or ext != self._unzipped_extension:
|
||||||
@ -137,7 +137,7 @@ class Bundle:
|
|||||||
os.remove(os.path.join(root, name))
|
os.remove(os.path.join(root, name))
|
||||||
for name in dirs:
|
for name in dirs:
|
||||||
os.rmdir(os.path.join(root, name))
|
os.rmdir(os.path.join(root, name))
|
||||||
os.rmdir(root)
|
os.rmdir(self._path)
|
||||||
else:
|
else:
|
||||||
if not os.path.isfile(self._path) or ext != self._zipped_extension:
|
if not os.path.isfile(self._path) or ext != self._zipped_extension:
|
||||||
raise InvalidPathException
|
raise InvalidPathException
|
||||||
|
Loading…
Reference in New Issue
Block a user