From f62f3d6e68db6b0c06e4a5084498c50bf5942f71 Mon Sep 17 00:00:00 2001 From: jan6 Date: Sun, 7 Nov 2021 12:27:04 +0200 Subject: [PATCH] handle no tags at all without crashing (hopefully) --- stuff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stuff.py b/stuff.py index 120ff07..f74fd8c 100755 --- a/stuff.py +++ b/stuff.py @@ -139,7 +139,7 @@ def stuff(bot, sock): line.tags["account"] in admin_accounts or line.source in admin_users ) - except KeyError: + except (KeyError, TypeError): #either no account tag, or no tags at all is_adm = line.source in admin_users # update command module's info dynamically for line info