From 50149523ddb2901e6ba3559bbf37dce192af1d1a Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 3 Dec 2018 18:25:57 +0000 Subject: re-add check in utils.irc.parse_line that prevents us having an empty string as an arg when there's no non-arbitrary args --- src/utils/irc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/utils') diff --git a/src/utils/irc.py b/src/utils/irc.py index 56c030b2..e1021587 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -109,7 +109,10 @@ def parse_line(line: str) -> IRCLine: prefix = seperate_hostmask(prefix_str) command, sep, line = line.partition(" ") - args = line.split(" ") + args = [] # type: typing.List[str] + if line: + # this is so that `args` is empty if `line` is empty + args = line.split(" ") if arbitrary: args.append(arbitrary) -- cgit v1.3.1-10-gc9f91