commit 068784afab28631b2a8fcd5dbc55a777508f63b6
Author: Alexis Lee <email address hidden>
Date: Tue Feb 2 16:19:20 2016 +0000
Fix unrecognized subparser args
Someone thought a transient attr would be a clever way to smuggle data
from a _SubParsersAction up to the main ArgumentsParser. Unfortunately
they use a really weird way to set the attr:
This bypasses __setattr__ so when they try to delattr later,
__delattr__ can't find it and bombs. Even though the delattr is
protected by a hasattr, because hasattr uses getattr which checks the
private object dict first before calling __getattr__.
Handle this by falling back to super in __getattr__ and __delattr__.
Reviewed: https:/ /review. openstack. org/275307 /git.openstack. org/cgit/ openstack/ oslo.config/ commit/ ?id=068784afab2 8631b2a8fcd5dbc 55a777508f63b6
Committed: https:/
Submitter: Jenkins
Branch: master
commit 068784afab28631 b2a8fcd5dbc55a7 77508f63b6
Author: Alexis Lee <email address hidden>
Date: Tue Feb 2 16:19:20 2016 +0000
Fix unrecognized subparser args
Someone thought a transient attr would be a clever way to smuggle data
from a _SubParsersAction up to the main ArgumentsParser. Unfortunately
they use a really weird way to set the attr:
This bypasses __setattr__ so when they try to delattr later,
__delattr__ can't find it and bombs. Even though the delattr is
protected by a hasattr, because hasattr uses getattr which checks the
private object dict first before calling __getattr__.
Handle this by falling back to super in __getattr__ and __delattr__.
Change-Id: Id89a0c00fd32b6 580d891ccf69d58 fa17f11ec49
Closes-Bug: #1540959