Skip to content

Commit

Permalink
some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Aug 1, 2012
1 parent f3c2525 commit 65a0dce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ckan/lib/maintain.py
Expand Up @@ -65,10 +65,13 @@ def deprecate_context_item(item_name, message=''):
'''

class Fake(object):
''' This is a fake object that calls the methods of the object
contained. '''
def __init__(self, obj):
self._obj = obj
def __getattribute__(self,name):
obj = object.__getattribute__(self, '_obj')
# hack to get the actual object when needed
if name == '_obj':
return obj
return getattr(obj, name)
Expand Down

0 comments on commit 65a0dce

Please sign in to comment.