diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-27 14:53:13 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-27 14:53:13 -0400 |
commit | d0f3a6078c944cbfd1406a5e2f01f9cf56f2f5c1 (patch) | |
tree | 56ab82912c4768f443c90419a98bb81fa3640ebc /cmd2/parsing.py | |
parent | a42b4176e1cbf77c8e78ce2c3069fc93567d336b (diff) | |
download | cmd2-git-d0f3a6078c944cbfd1406a5e2f01f9cf56f2f5c1.tar.gz |
Refactored
Diffstat (limited to 'cmd2/parsing.py')
-rw-r--r-- | cmd2/parsing.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/parsing.py b/cmd2/parsing.py index fe08420a..9b86b487 100644 --- a/cmd2/parsing.py +++ b/cmd2/parsing.py @@ -315,10 +315,10 @@ class StatementParser: if not word: return False, 'cannot be an empty string' - errmsg = 'cannot start with a shortcut: ' - errmsg += ', '.join(shortcut for (shortcut, expansion) in self.shortcuts) for (shortcut, expansion) in self.shortcuts: if word.startswith(shortcut): + errmsg = 'cannot start with a shortcut: ' + errmsg += ', '.join(shortcut for (shortcut, expansion) in self.shortcuts) return False, errmsg errmsg = 'cannot contain: whitespace, quotes, ' |