Skip to content

Commit

Permalink
blanket try-catch to ensure following unpatch code (#6385)
Browse files Browse the repository at this point in the history
* blanket try-catch to ensure following unpatch code

* review comments

* comments
  • Loading branch information
williexu authored May 18, 2018
1 parent ee7b39d commit 6d8dbb0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ def mute_parse_args(self, text):
AzCliCommandParser.error = error_pass
AzCliCommandParser._check_value = _check_value_muted

parse_args = self.argsfinder.get_parsed_args(
parse_quotes(text, quotes=False, string=False))
# No exception is expected. However, we add this try-catch block, as this may have far-reaching effects.
try:
parse_args = self.argsfinder.get_parsed_args(parse_quotes(text, quotes=False, string=False))
except Exception: # pylint: disable=broad-except
pass

AzCliCommandParser.error = error
AzCliCommandParser._check_value = _check_value
Expand Down

0 comments on commit 6d8dbb0

Please sign in to comment.