~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/decorators.py

  • Committer: Martin Pool
  • Date: 2006-01-13 06:38:56 UTC
  • mto: (1185.65.28 storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: mbp@sourcefrog.net-20060113063856-484eed116191727b
Pass through wrapped function name and docstrign 
in needs_read_lock and needs_write_lock decorators.  Test this works.
(Suggestion from John)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
            return unbound(self, *args, **kwargs)
35
35
        finally:
36
36
            self.unlock()
 
37
    decorated.__doc__ = unbound.__doc__
 
38
    decorated.__name__ = unbound.__name__
37
39
    return decorated
38
40
 
39
41
 
45
47
            return unbound(self, *args, **kwargs)
46
48
        finally:
47
49
            self.unlock()
 
50
    decorated.__doc__ = unbound.__doc__
 
51
    decorated.__name__ = unbound.__name__
48
52
    return decorated
49
53