black pass

This commit is contained in:
ave 2022-05-24 23:29:46 +02:00
parent 4f027a7d9b
commit 01f2cf7751
4 changed files with 8 additions and 8 deletions

View file

@ -235,5 +235,6 @@ async def main():
log.exception(f"Failed to load cog {cog}.")
await bot.start(config.token)
if __name__ == "__main__":
asyncio.run(main())

View file

@ -56,9 +56,7 @@ class Basic(Cog):
rtt_ms = (after - before) * 1000
gw_ms = self.bot.latency * 1000
message_text = (
f":ping_pong:\nrtt: `{rtt_ms:.1f}ms`\ngw: `{gw_ms:.1f}ms`"
)
message_text = f":ping_pong:\nrtt: `{rtt_ms:.1f}ms`\ngw: `{gw_ms:.1f}ms`"
self.bot.log.info(message_text)
await tmp.edit(content=message_text)

View file

@ -84,15 +84,16 @@ class YubicoOTP(Cog):
resp = await self.bot.aiosession.get(url)
assert resp.status == 200
except Exception as ex:
self.bot.log.warning(
f"Got {repr(ex)} on {api_server} with otp {otp}."
)
self.bot.log.warning(f"Got {repr(ex)} on {api_server} with otp {otp}.")
continue
resptext = await resp.text()
# Turn the fields to a python dict for easier parsing
datafields = resptext.strip().split("\r\n")
datafields = {line[:line.index("=")]: line[line.index("=") + 1:] for line in datafields}
datafields = {
line[: line.index("=")]: line[line.index("=") + 1 :]
for line in datafields
}
# Verify nonce
assert datafields["nonce"] == nonce

View file

@ -39,7 +39,7 @@ initial_cogs = [
"cogs.robocronp",
"cogs.meme",
"cogs.invites",
"cogs.yubicootp"
"cogs.yubicootp",
]
# The following cogs are also available but aren't loaded by default: