mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-05-06 11:12:39 +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:
@@ -63,7 +63,7 @@ def configured_reply(self):
|
||||
r = replyFn(msg)
|
||||
if r is not None:
|
||||
self.send(r, msg.get('FromUserName'))
|
||||
except:
|
||||
except Exception:
|
||||
logger.warning(traceback.format_exc())
|
||||
|
||||
def msg_register(self, msgType, isFriendChat=False, isGroupChat=False, isMpChat=False):
|
||||
|
||||
Reference in New Issue
Block a user