Fix handling missing argument in clear-db-cache (ref #286)

This commit is contained in:
Tulir Asokan
2019-03-02 04:03:32 +02:00
parent 8ef337f40b
commit 9eda525d2a
+1 -1
View File
@@ -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 <section>`")
if section == "portal":
po.Portal.by_tgid = {}