diff options
| author | Sky Leite <sky@leite.dev> | 2023-02-04 00:12:00 -0300 |
|---|---|---|
| committer | Sky Leite <sky@leite.dev> | 2023-02-04 00:12:00 -0300 |
| commit | 93587fe33bdeefb7368a347ad60f9baf601b8eaa (patch) | |
| tree | 1a5e7cae73ccc0909e7c3f1f2dd56fbd8d05e663 | |
| parent | 8fab4871535a3ce28aa76d278a9752c8db038ac5 (diff) | |
| download | decky-loader-93587fe33bdeefb7368a347ad60f9baf601b8eaa.tar.gz decky-loader-93587fe33bdeefb7368a347ad60f9baf601b8eaa.zip | |
Fix E722 linter rule
| -rw-r--r-- | backend/browser.py | 6 | ||||
| -rw-r--r-- | backend/helpers.py | 2 | ||||
| -rw-r--r-- | backend/main.py | 2 | ||||
| -rw-r--r-- | backend/plugin.py | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/backend/browser.py b/backend/browser.py index 1c239399..0a365e52 100644 --- a/backend/browser.py +++ b/backend/browser.py @@ -132,7 +132,7 @@ class PluginBrowser: if plugin["name"] == name: return str(path.join(self.plugin_path, folder)) - except: + except Exception: logger.debug(f"skipping {folder}") async def uninstall_plugin(self, name): @@ -174,7 +174,7 @@ class PluginBrowser: pluginFolderPath = self.find_plugin_folder(name) if pluginFolderPath: isInstalled = True - except: + except Exception: logger.error( f"Failed to determine if {name} is already installed, continuing" " anyway." @@ -192,7 +192,7 @@ class PluginBrowser: try: logger.debug("Uninstalling existing plugin...") await self.uninstall_plugin(name) - except: + except Exception: logger.error(f"Plugin {name} could not be uninstalled.") logger.debug("Unzipping...") ret = self._unzip_to_plugin_dir(res_zip, name, hash) diff --git a/backend/helpers.py b/backend/helpers.py index d817f0b9..0c1ba6b1 100644 --- a/backend/helpers.py +++ b/backend/helpers.py @@ -174,7 +174,7 @@ async def download_remote_binary_to_path(url, binHash, path) -> bool: ) else: rv = False - except: + except Exception: rv = False return rv diff --git a/backend/main.py b/backend/main.py index 031564de..9a21bd7f 100644 --- a/backend/main.py +++ b/backend/main.py @@ -199,7 +199,7 @@ class PluginManager: False, False, ) - except: + except Exception: logger.info("Failed to inject JavaScript into tab\n" + format_exc()) pass diff --git a/backend/plugin.py b/backend/plugin.py index 3335f472..9d8acec1 100644 --- a/backend/plugin.py +++ b/backend/plugin.py @@ -114,7 +114,7 @@ class PluginWrapper: get_event_loop().create_task(self.Plugin._main(self.Plugin)) get_event_loop().create_task(self._setup_socket()) get_event_loop().run_forever() - except: + except Exception: self.log.error("Failed to start " + self.name + "!\n" + format_exc()) exit(0) @@ -132,7 +132,7 @@ class PluginWrapper: self.log.info( 'Could not find "_unload" in ' + self.name + "'s main.py" + "\n" ) - except: + except Exception: self.log.error("Failed to unload " + self.name + "!\n" + format_exc()) exit(0) @@ -185,7 +185,7 @@ class PluginWrapper: self.socket_addr, limit=BUFFER_LIMIT ) return True - except: + except Exception: await sleep(2) retries += 1 return False |
