replace except with except Exception

This commit is contained in:
Kevin Trocolli
2023-07-16 16:58:34 -04:00
parent 343fe4357c
commit 14a315a673
14 changed files with 33 additions and 30 deletions

View File

@@ -426,7 +426,7 @@ class WaccaBase:
elif item["type"] == WaccaConstants.ITEM_TYPES["note_sound"]:
resp.userItems.noteSounds.append(itm_send)
except:
except Exception:
self.logger.error(
f"{__name__} Failed to load item {item['item_id']} for user {profile['user']}"
)

View File

@@ -221,5 +221,5 @@ class WaccaConstants:
cls.Region.YAMANASHI,
cls.Region.WAKAYAMA,
][region]
except:
except Exception:
return None

View File

@@ -93,7 +93,7 @@ class WaccaServlet:
try:
req_json = json.loads(request.content.getvalue())
version_full = Version(req_json["appVersion"])
except:
except Exception:
self.logger.error(
f"Failed to parse request to {url_path} -> {request.content.getvalue()}"
)

View File

@@ -424,7 +424,7 @@ class WaccaLily(WaccaS):
elif item["type"] == WaccaConstants.ITEM_TYPES["note_sound"]:
resp.userItems.noteSounds.append(itm_send)
except:
except Exception:
self.logger.error(
f"{__name__} Failed to load item {item['item_id']} for user {profile['user']}"
)

View File

@@ -289,7 +289,7 @@ class WaccaReverse(WaccaLilyR):
elif item["type"] == WaccaConstants.ITEM_TYPES["note_sound"]:
resp.userItems.noteSounds.append(itm_send)
except:
except Exception:
self.logger.error(
f"{__name__} Failed to load item {item['item_id']} for user {profile['user']}"
)