Skip to content

Commit

Permalink
Catch SystemExit for parse args
Browse files Browse the repository at this point in the history
If you have a test with parse args it fails with no error
messages.  This change throws an exception.

Change-Id: I545aba346620a352fe570d394dbd4d6bd2daa995
  • Loading branch information
TerryHowe committed Jul 6, 2014
1 parent b3736fd commit 7948837
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion openstackclient/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ def setUp(self):

def check_parser(self, cmd, args, verify_args):
cmd_parser = cmd.get_parser('check_parser')
parsed_args = cmd_parser.parse_args(args)
try:
parsed_args = cmd_parser.parse_args(args)
except SystemExit:
raise Exception("Argument parse failed")
for av in verify_args:
attr, value = av
if attr:
Expand Down

0 comments on commit 7948837

Please sign in to comment.