summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-03 00:47:27 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-03 00:47:27 -0500
commitf5a425342704bca27f081c973a3625bce3770d6b (patch)
treed9842062dff3fa38a63c38017c5c2d53d7b43e75 /cmd2.py
parent4ffaf5397eeeb622c7a0dfaa3527a51c34f26618 (diff)
downloadcmd2-git-f5a425342704bca27f081c973a3625bce3770d6b.tar.gz
Improve earlier fix by catching a specific exception instead of all exceptions
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 4941580e..84d88b46 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -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)