diff options
| author | 2018-12-03 18:25:57 +0000 | |
|---|---|---|
| committer | 2018-12-03 18:25:57 +0000 | |
| commit | 50149523ddb2901e6ba3559bbf37dce192af1d1a (patch) | |
| tree | 52d13d751c4c3e620a3c4ead415d0c78cec5fc13 /src/utils/irc.py | |
| parent | Further clarification of type hints in ModuleManager.py, including now making it (diff) | |
| signature | ||
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
Diffstat (limited to 'src/utils/irc.py')
| -rw-r--r-- | src/utils/irc.py | 5 |
1 files changed, 4 insertions, 1 deletions
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) |
