blanket try-catch to ensure following unpatch code#6385
Conversation
|
View a preview at https://prompt.ws/r/Azure/azure-cli/6385 |
| parse_args = self.argsfinder.get_parsed_args( | ||
| parse_quotes(text, quotes=False, string=False)) | ||
| try: | ||
| parse_args = self.argsfinder.get_parsed_args( |
| try: | ||
| parse_args = self.argsfinder.get_parsed_args( | ||
| parse_quotes(text, quotes=False, string=False)) | ||
| except Exception: # pylint: disable=broad-except |
There was a problem hiding this comment.
What kind the exception will actually be thrown here?
There was a problem hiding this comment.
From what I can see, none. argparse will call error() (which is also patched) with any parser related errors.
This is more of a safety assurance change- we don't want the patched methods to persist anywhere beyond this scope.
| try: | ||
| parse_args = self.argsfinder.get_parsed_args( | ||
| parse_quotes(text, quotes=False, string=False)) | ||
| except Exception: # pylint: disable=broad-except |
|
@troydai addressed your comments |
|
Merge once CI passes. |
Codecov Report
@@ Coverage Diff @@
## dev #6385 +/- ##
===================================
Coverage 0% 0%
===================================
Files 11 11
Lines 133 133
Branches 8 9 +1
===================================
Misses 133 133Continue to review full report at Codecov.
|
Following from feedback on #6381
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).
I adhere to the Command Guidelines.