fix: replace bare except clauses with except Exception

Bare `except:` catches BaseException including KeyboardInterrupt and
SystemExit. Replaced 29 instances with `except Exception:`.
This commit is contained in:
haosenwang1018
2026-02-25 11:49:19 +00:00
parent 1a7a8c98d9
commit adca89b973
20 changed files with 29 additions and 29 deletions

View File

@@ -287,7 +287,7 @@ def get_contact(self, update=False):
'User-Agent': config.USER_AGENT, }
try:
r = self.s.get(url, headers=headers)
except:
except Exception:
logger.info(
'Failed to fetch contact, that may because of the amount of your chatrooms')
for chatroom in self.get_chatrooms():