Skip to content

Commit

Permalink
修正重置链接邮件不及时导致抛出异常的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
luolongfei committed Jan 13, 2022
1 parent 02aba85 commit 329a2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netflix.py
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ def pwd_reset_request_mail_listener(self, netflix_account_email) -> str or None:
# 拉取最新邮件
resp = self.__fetch_mail(netflix_account_email)

if self.is_password_reset_request(resp['text']):
if resp and self.is_password_reset_request(resp.get('text', '')):
logger.info('Netflix 账户 {} 已收到请求重置密码的邮件,开始提取重置链接', netflix_account_email)

match = Netflix.RESET_URL_REGEX.search(resp['text'])
Expand Down

0 comments on commit 329a2c9

Please sign in to comment.