mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 06:21:58 +00:00
Fix E722 linter rule
This commit is contained in:
+3
-3
@@ -132,7 +132,7 @@ class PluginBrowser:
|
|||||||
|
|
||||||
if plugin["name"] == name:
|
if plugin["name"] == name:
|
||||||
return str(path.join(self.plugin_path, folder))
|
return str(path.join(self.plugin_path, folder))
|
||||||
except:
|
except Exception:
|
||||||
logger.debug(f"skipping {folder}")
|
logger.debug(f"skipping {folder}")
|
||||||
|
|
||||||
async def uninstall_plugin(self, name):
|
async def uninstall_plugin(self, name):
|
||||||
@@ -174,7 +174,7 @@ class PluginBrowser:
|
|||||||
pluginFolderPath = self.find_plugin_folder(name)
|
pluginFolderPath = self.find_plugin_folder(name)
|
||||||
if pluginFolderPath:
|
if pluginFolderPath:
|
||||||
isInstalled = True
|
isInstalled = True
|
||||||
except:
|
except Exception:
|
||||||
logger.error(
|
logger.error(
|
||||||
f"Failed to determine if {name} is already installed, continuing"
|
f"Failed to determine if {name} is already installed, continuing"
|
||||||
" anyway."
|
" anyway."
|
||||||
@@ -192,7 +192,7 @@ class PluginBrowser:
|
|||||||
try:
|
try:
|
||||||
logger.debug("Uninstalling existing plugin...")
|
logger.debug("Uninstalling existing plugin...")
|
||||||
await self.uninstall_plugin(name)
|
await self.uninstall_plugin(name)
|
||||||
except:
|
except Exception:
|
||||||
logger.error(f"Plugin {name} could not be uninstalled.")
|
logger.error(f"Plugin {name} could not be uninstalled.")
|
||||||
logger.debug("Unzipping...")
|
logger.debug("Unzipping...")
|
||||||
ret = self._unzip_to_plugin_dir(res_zip, name, hash)
|
ret = self._unzip_to_plugin_dir(res_zip, name, hash)
|
||||||
|
|||||||
+1
-1
@@ -174,7 +174,7 @@ async def download_remote_binary_to_path(url, binHash, path) -> bool:
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
rv = False
|
rv = False
|
||||||
except:
|
except Exception:
|
||||||
rv = False
|
rv = False
|
||||||
|
|
||||||
return rv
|
return rv
|
||||||
|
|||||||
+1
-1
@@ -199,7 +199,7 @@ class PluginManager:
|
|||||||
False,
|
False,
|
||||||
False,
|
False,
|
||||||
)
|
)
|
||||||
except:
|
except Exception:
|
||||||
logger.info("Failed to inject JavaScript into tab\n" + format_exc())
|
logger.info("Failed to inject JavaScript into tab\n" + format_exc())
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -114,7 +114,7 @@ class PluginWrapper:
|
|||||||
get_event_loop().create_task(self.Plugin._main(self.Plugin))
|
get_event_loop().create_task(self.Plugin._main(self.Plugin))
|
||||||
get_event_loop().create_task(self._setup_socket())
|
get_event_loop().create_task(self._setup_socket())
|
||||||
get_event_loop().run_forever()
|
get_event_loop().run_forever()
|
||||||
except:
|
except Exception:
|
||||||
self.log.error("Failed to start " + self.name + "!\n" + format_exc())
|
self.log.error("Failed to start " + self.name + "!\n" + format_exc())
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ class PluginWrapper:
|
|||||||
self.log.info(
|
self.log.info(
|
||||||
'Could not find "_unload" in ' + self.name + "'s main.py" + "\n"
|
'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())
|
self.log.error("Failed to unload " + self.name + "!\n" + format_exc())
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
@@ -185,7 +185,7 @@ class PluginWrapper:
|
|||||||
self.socket_addr, limit=BUFFER_LIMIT
|
self.socket_addr, limit=BUFFER_LIMIT
|
||||||
)
|
)
|
||||||
return True
|
return True
|
||||||
except:
|
except Exception:
|
||||||
await sleep(2)
|
await sleep(2)
|
||||||
retries += 1
|
retries += 1
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user