aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2019-03-08 23:23:09 +0000
committerGravatar jesopo2019-03-08 23:23:09 +0000
commitf1348e5679a501b8561fe445634587924c8d3ce8 (patch)
treecc00f6a484c3bd194310b0d766f440442ac85ff1
parentFix local variable overwrite for `reason` in formatted.quit logic (diff)
signature
Handle IRCArgs being empty strings (e.g. 'PRIVMSG #test :')
-rw-r--r--src/IRCLine.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/IRCLine.py b/src/IRCLine.py
index 4fd2a74d..970c2861 100644
--- a/src/IRCLine.py
+++ b/src/IRCLine.py
@@ -68,7 +68,8 @@ class ParsedLine(object):
if self.args:
for i, arg in enumerate(self._args):
- if i == len(self._args)-1 and (" " in arg or arg[0] == ":"):
+ if arg and i == len(self._args)-1 and (
+ " " in arg or arg[0] == ":"):
pieces.append(":%s" % arg)
else:
pieces.append(arg)