diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-08-13 15:26:19 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-08-13 15:26:19 -0400 |
commit | bafdccac3ba7237e4570db90551f46ef964a442b (patch) | |
tree | 7096e963ac740f2d5d029230441d7b87fc9bd923 /cmd2/cmd2.py | |
parent | 71367fb6e945414efc5927bbd9792dae35b8b3f9 (diff) | |
download | cmd2-git-bafdccac3ba7237e4570db90551f46ef964a442b.tar.gz |
Fixed warning
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-x | cmd2/cmd2.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 40466446..c8b3a9db 100755 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2959,14 +2959,11 @@ class Cmd(cmd.Cmd): choice = int(response) if choice < 1: raise IndexError - result = fulloptions[choice - 1][0] - break + return fulloptions[choice - 1][0] except (ValueError, IndexError): self.poutput("{!r} isn't a valid choice. Pick a number between 1 and {}:".format( response, len(fulloptions))) - return result - def _get_read_only_settings(self) -> str: """Return a summary report of read-only settings which the user cannot modify at runtime. |