Skip to content

Commit e796fee

Browse files
committed
After review comments
1 parent 2131bdf commit e796fee

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Lib/argparse.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2593,11 +2593,7 @@ def _check_value(self, action, value, arg_string=None):
25932593
action.type and
25942594
all(isinstance(choice, str) for choice in choices)
25952595
):
2596-
try:
2597-
typed_choices = [action.type(v) for v in choices]
2598-
except Exception:
2599-
# We use a blanket catch here, because type is user provided.
2600-
pass
2596+
typed_choices = [action.type(v) for v in choices]
26012597

26022598
if value not in choices and value not in typed_choices:
26032599
args = {'value': arg_string,

0 commit comments

Comments
 (0)