Commit 87637bdf authored by Stephen Finucane's avatar Stephen Finucane

Remove dead code

The 'monkeypatch_method' function no longer has any callers and can be

Change-Id: I402eb482d2c1db7331bd872c5169db8e59c9a34f
Signed-off-by: 's avatarStephen Finucane <>
parent 07de8446
......@@ -674,21 +674,6 @@ def split_csv(value):
return value
def monkeypatch_method(cls):
"""A function decorator to monkey-patch a method of the same name on the
given class.
def wrapper(func):
orig = getattr(cls, func.__name__, None)
if orig and not hasattr(orig, '_orig'): # Already patched
setattr(func, '_orig', orig)
setattr(cls, func.__name__, func)
return func
return wrapper
# The following classes are used to hack Distribution.command_options a bit
class DefaultGetDict(defaultdict):
"""Like defaultdict, but the get() method also sets and returns the default
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment