~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Andrew Bennetts
  • Date: 2011-05-18 15:45:07 UTC
  • mto: This revision was merged to the branch mainline in revision 5895.
  • Revision ID: andrew.bennetts@canonical.com-20110518154507-t3qudgcb7fj3omjc
Use pydoctor in api-docs make target.

Show diffs side-by-side

added added

removed removed

Lines of Context:
114
114
        except FileExists:
115
115
            raise LockError('File %r already locked' % (self.path,))
116
116
 
 
117
    def __del__(self):
 
118
        """Should this warn, or actually try to cleanup?"""
 
119
        if self.lock_file:
 
120
            warning("SFTPLock %r not explicitly unlocked" % (self.path,))
 
121
            self.unlock()
 
122
 
117
123
    def unlock(self):
118
124
        if not self.lock_file:
119
125
            return