Reverses all the SmartSet() calls, restoring things to their original definition. Its okay to call SmartUnsetAll() repeatedly, as later calls have no effect if no SmartSet() calls have been made.
(self)
| 97 | setattr(orig_obj, attr_name, new_attr) |
| 98 | |
| 99 | def SmartUnsetAll(self): |
| 100 | """Reverses all the SmartSet() calls, restoring things to their original |
| 101 | definition. Its okay to call SmartUnsetAll() repeatedly, as later calls |
| 102 | have no effect if no SmartSet() calls have been made. |
| 103 | |
| 104 | """ |
| 105 | self.stubs.reverse() |
| 106 | |
| 107 | for args in self.stubs: |
| 108 | setattr(*args) |
| 109 | |
| 110 | self.stubs = [] |
| 111 | |
| 112 | def Set(self, parent, child_name, new_child): |
| 113 | """Replace child_name's old definition with new_child, in the context |