]> granicus.if.org Git - python/commitdiff
Merge 3.2 fix updates and tests for issue #15906.
authorBarry Warsaw <barry@python.org>
Wed, 12 Sep 2012 19:31:38 +0000 (15:31 -0400)
committerBarry Warsaw <barry@python.org>
Wed, 12 Sep 2012 19:31:38 +0000 (15:31 -0400)
1  2 
Lib/argparse.py
Lib/test/test_argparse.py

diff --cc Lib/argparse.py
index 66cd70aa315aa5cc5d50b9def978a9a68a25a144,eb894caebc20f57347116bebfbebc866390af2e9..f25b1b66109596f0646d4743fd9101ce3c62dd05
@@@ -1961,9 -1957,9 +1961,9 @@@ class ArgumentParser(_AttributeHolder, 
                      # 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)):
++                        isinstance(action.default, str) and
 +                        hasattr(namespace, action.dest) and
 +                        action.default is getattr(namespace, action.dest)):
                          setattr(namespace, action.dest,
                                  self._get_value(action, action.default))
  
Simple merge