aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2018-12-03 18:25:57 +0000
committerGravatar jesopo2018-12-03 18:25:57 +0000
commit50149523ddb2901e6ba3559bbf37dce192af1d1a (patch)
tree52d13d751c4c3e620a3c4ead415d0c78cec5fc13
parentFurther 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
-rw-r--r--src/utils/irc.py5
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)