diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-03 00:47:27 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-03 00:47:27 -0500 |
commit | f5a425342704bca27f081c973a3625bce3770d6b (patch) | |
tree | d9842062dff3fa38a63c38017c5c2d53d7b43e75 /cmd2.py | |
parent | 4ffaf5397eeeb622c7a0dfaa3527a51c34f26618 (diff) | |
download | cmd2-git-f5a425342704bca27f081c973a3625bce3770d6b.tar.gz |
Improve earlier fix by catching a specific exception instead of all exceptions
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -119,7 +119,7 @@ def remaining_args(oldArgs, newArgList): matchObj = re.search(pattern, oldArgs) try: remaining = oldArgs[matchObj.start():] - except: + except AttributeError: # Don't preserve spacing, but at least we don't crash and we do preserve args and their order remaining = ' '.join(newArgList) |