Skip to content

Commit

Permalink
Fix proxy is NoneType
Browse files Browse the repository at this point in the history
  • Loading branch information
a76yyyy committed May 18, 2023
1 parent fcc217a commit eee1dc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/handlers/subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ async def post(self, userid):
repos = json.loads((await self.db.site.get(1, fields=('repos',), sql_session=sql_session))['repos'])
if proxies:
proxy = random.choice(proxies)
if proxy.get("href"):
if proxy and proxy.get("href"):
proxy = proxy["href"]
else:
proxy = None
Expand Down

0 comments on commit eee1dc4

Please sign in to comment.