mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Merge 3.2 fix updates and tests for issue #15906.
This commit is contained in:
commit
d89774e158
2 changed files with 28 additions and 5 deletions
|
@ -1961,7 +1961,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
|
|||
# twice (which may fail) if the argument was given, but
|
||||
# only if it was defined already in the namespace
|
||||
if (action.default is not None and
|
||||
isinstance(action, _StoreAction) and
|
||||
isinstance(action.default, str) and
|
||||
hasattr(namespace, action.dest) and
|
||||
action.default is getattr(namespace, action.dest)):
|
||||
setattr(namespace, action.dest,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue