mirror of
https://gitlab.com/chicken-riders/RcGcDb.git
synced 2025-02-23 00:54:09 +00:00
Fixed omission with links of some compact msgs, fixed compatibility with python 3.7
This commit is contained in:
parent
cfa5661480
commit
eb222bf8b4
|
@ -256,8 +256,10 @@ async def compact_formatter(action, change, parsed_comment, categories, recent_c
|
||||||
elif action == "newusers/create":
|
elif action == "newusers/create":
|
||||||
content = _("Account [{author}]({author_url}) was created").format(author=author, author_url=author_url)
|
content = _("Account [{author}]({author_url}) was created").format(author=author, author_url=author_url)
|
||||||
elif action == "newusers/create2":
|
elif action == "newusers/create2":
|
||||||
|
link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH))
|
||||||
content = _("Account [{article}]({article_url}) was created by [{author}]({author_url}){comment}").format(article=change["title"], article_url=link, author=author, author_url=author_url, comment=parsed_comment)
|
content = _("Account [{article}]({article_url}) was created by [{author}]({author_url}){comment}").format(article=change["title"], article_url=link, author=author, author_url=author_url, comment=parsed_comment)
|
||||||
elif action == "newusers/byemail":
|
elif action == "newusers/byemail":
|
||||||
|
link = link_formatter(create_article_path(change["title"], WIKI_ARTICLE_PATH))
|
||||||
content = _("Account [{article}]({article_url}) was created by [{author}]({author_url}) and password was sent by email{comment}").format(article=change["title"], article_url=link, author=author, author_url=author_url, comment=parsed_comment)
|
content = _("Account [{article}]({article_url}) was created by [{author}]({author_url}) and password was sent by email{comment}").format(article=change["title"], article_url=link, author=author, author_url=author_url, comment=parsed_comment)
|
||||||
elif action == "newusers/newusers":
|
elif action == "newusers/newusers":
|
||||||
content = _("Account [{author}]({author_url}) was created").format(author=author, author_url=author_url)
|
content = _("Account [{author}]({author_url}) was created").format(author=author, author_url=author_url)
|
||||||
|
|
|
@ -56,7 +56,7 @@ class Wiki:
|
||||||
request = await session.get(url, timeout=5, allow_redirects=False)
|
request = await session.get(url, timeout=5, allow_redirects=False)
|
||||||
request.raise_for_status()
|
request.raise_for_status()
|
||||||
json_request = await request.json(encoding="UTF-8")
|
json_request = await request.json(encoding="UTF-8")
|
||||||
except (aiohttp.ClientConnectionError, aiohttp.ServerTimeoutError, asyncio.exceptions.TimeoutError):
|
except (aiohttp.ClientConnectionError, aiohttp.ServerTimeoutError, asyncio.TimeoutError):
|
||||||
logger.exception("Reached connection error for request on link {url}".format(url=url))
|
logger.exception("Reached connection error for request on link {url}".format(url=url))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue