empty last params should be colon-prepended

This commit is contained in:
jesopo 2020-03-23 16:59:32 +00:00
parent 5b998e816f
commit 85e21c5421
1 changed files with 3 additions and 1 deletions

View File

@ -106,7 +106,9 @@ class Line(object):
raise ValueError("non last params cannot start with colon")
outs.extend(params)
if " " in last or last.startswith(":"):
if (not last or
" " in last or
last.startswith(":")):
last = f":{last}"
outs.append(last)
return " ".join(outs)