From 9eda525d2a228e9423d62d67c7fb17dd8c80284a Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sat, 2 Mar 2019 04:03:32 +0200 Subject: [PATCH] Fix handling missing argument in clear-db-cache (ref #286) --- mautrix_telegram/commands/portal/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mautrix_telegram/commands/portal/admin.py b/mautrix_telegram/commands/portal/admin.py index 4815eb28..52197008 100644 --- a/mautrix_telegram/commands/portal/admin.py +++ b/mautrix_telegram/commands/portal/admin.py @@ -52,7 +52,7 @@ async def set_power_level(evt: CommandEvent) -> Dict: async def clear_db_cache(evt: CommandEvent) -> Dict: try: section = evt.args[0].lower() - except KeyError: + except IndexError: return await evt.reply("**Usage:** `$cmdprefix+sp clear-db-cache
`") if section == "portal": po.Portal.by_tgid = {}