mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Fixed a bug where profile comment can be None
This commit is contained in:
parent
7470612284
commit
7367973ea7
|
@ -97,6 +97,8 @@ class Wiki:
|
||||||
"{wiki}?action=comment&do=getRaw&comment_id={comment}&format=json".format(wiki=WIKI_API_PATH,
|
"{wiki}?action=comment&do=getRaw&comment_id={comment}&format=json".format(wiki=WIKI_API_PATH,
|
||||||
comment=comment_id), "text")
|
comment=comment_id), "text")
|
||||||
logger.debug("Got the following comment from the API: {}".format(comment))
|
logger.debug("Got the following comment from the API: {}".format(comment))
|
||||||
|
if comment is None:
|
||||||
|
raise TypeError
|
||||||
except (TypeError, AttributeError):
|
except (TypeError, AttributeError):
|
||||||
logger.exception("Could not resolve the comment text.")
|
logger.exception("Could not resolve the comment text.")
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in a new issue