diff options
Diffstat (limited to 'backend/browser.py')
| -rw-r--r-- | backend/browser.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/browser.py b/backend/browser.py index 6e6963dd..c491f17a 100644 --- a/backend/browser.py +++ b/backend/browser.py @@ -37,7 +37,6 @@ class PluginBrowser: return False zip_file = ZipFile(zip) zip_file.extractall(self.plugin_path) - rename(path.join(self.plugin_path, zip_file.namelist()[0]), path.join(self.plugin_path, name)) Popen(["chown", "-R", "deck:deck", self.plugin_path]) Popen(["chmod", "-R", "555", self.plugin_path]) return True @@ -66,7 +65,10 @@ class PluginBrowser: return web.Response(text="Requested plugin uninstall") async def _install(self, artifact, name, version, hash): - self.uninstall_plugin(name) + try: + await self.uninstall_plugin(name) + except: + self.log.error(f"Plugin {name} not installed, skipping uninstallation") self.log.info(f"Installing {name} (Version: {version})") async with ClientSession() as client: self.log.debug(f"Fetching {artifact}") |
