~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/atomicfile.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 00:26:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013002641-9tlh9k89mlj1666m
Keep docs-plain working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
from bzrlib.lazy_import import lazy_import
21
21
lazy_import(globals(), """
22
22
import stat
 
23
import socket
23
24
import warnings
24
25
 
25
26
from bzrlib import (
118
119
        """Discard the file unless already committed."""
119
120
        if self._fd is not None:
120
121
            self.abort()
 
122
 
 
123
    def __del__(self):
 
124
        if self._fd is not None:
 
125
            warnings.warn("%r leaked" % self)