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
This commit is contained in:
jesopo 2018-12-03 18:25:57 +00:00
parent 9dd9111f85
commit 50149523dd

View file

@ -109,7 +109,10 @@ def parse_line(line: str) -> IRCLine:
prefix = seperate_hostmask(prefix_str) prefix = seperate_hostmask(prefix_str)
command, sep, line = line.partition(" ") 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: if arbitrary:
args.append(arbitrary) args.append(arbitrary)