mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Attempt to fix exception part 2
This commit is contained in:
parent
e43239cae8
commit
2a9fa6590f
|
@ -80,8 +80,12 @@ class AioIRCCat(irc.client_aio.AioSimpleIRCClient):
|
||||||
if post.get('action', 'unknown') != "deleted": # ignore deletion events
|
if post.get('action', 'unknown') != "deleted": # ignore deletion events
|
||||||
if isinstance(post.get('url'), bytes) or post.get('url') == "":
|
if isinstance(post.get('url'), bytes) or post.get('url') == "":
|
||||||
return
|
return
|
||||||
|
try:
|
||||||
url = urlparse(post.get('url'))
|
url = urlparse(post.get('url'))
|
||||||
full_url ="https://"+ url.netloc + recognize_langs(url.path)
|
except KeyError:
|
||||||
|
return
|
||||||
|
lang = recognize_langs(url.path)
|
||||||
|
full_url = "https://" + url.netloc + lang
|
||||||
wiki = self.domain.get_wiki(full_url)
|
wiki = self.domain.get_wiki(full_url)
|
||||||
if wiki and wiki.discussion_id != -1:
|
if wiki and wiki.discussion_id != -1:
|
||||||
self.updated_discussions.add(full_url)
|
self.updated_discussions.add(full_url)
|
||||||
|
|
Loading…
Reference in a new issue