mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-22 14:48:41 +08:00
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:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user