~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/sftp.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-29 17:19:58 UTC
  • mfrom: (5967.8.4 rm-del-methods)
  • Revision ID: pqm@pqm.ubuntu.com-20110629171958-u8a6lkpw5kdnfm55
(mbp) remove most __del__ methods (Martin Pool)

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
 
 
123
117
    def unlock(self):
124
118
        if not self.lock_file:
125
119
            return