~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lazy_import.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-12 17:34:52 UTC
  • mto: This revision was merged to the branch mainline in revision 2004.
  • Revision ID: john@arbash-meinel.com-20060912173452-ef9e20b8a52ec3e6
Small cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        # del self._name
79
79
 
80
80
    def __getattribute__(self, attr):
81
 
        obj = object.__getattribute__(self, '_replace')()
82
 
        object.__getattribute__(self, '_cleanup')()
 
81
        _replace = object.__getattribute__(self, '_replace')
 
82
        obj = _replace()
 
83
        _cleanup = object.__getattribute__(self, '_cleanup')
 
84
        _cleanup()
83
85
        return getattr(obj, attr)
84
86
 
85
87
    def __call__(self, *args, **kwargs):
86
 
        obj = object.__getattribute__(self, '_replace')()
87
 
        object.__getattribute__(self, '_cleanup')()
 
88
        _replace = object.__getattribute__(self, '_replace')
 
89
        obj = _replace()
 
90
        _cleanup = object.__getattribute__(self, '_cleanup')
 
91
        _cleanup()
88
92
        return obj(*args, **kwargs)
89
93
 
90
94