/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/atomicfile.py

  • Committer: Martin Pool
  • Date: 2005-05-26 16:09:33 UTC
  • Revision ID: mbp@sourcefrog.net-20050526160933-bf9355014f417bdb
- Set Branch.base in class def to avoid it being undefined
  when introspecting half-constructed branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        if self.closed:
62
62
            raise Exception('%r is already closed' % self)
63
63
 
 
64
        self.f.close()
64
65
        self.closed = True
65
 
        self.f.close()
66
 
        self.f = None
67
 
        
68
66
        if sys.platform == 'win32':
69
67
            # windows cannot rename over an existing file
70
68
            try:
73
71
                import errno
74
72
                if e.errno != errno.ENOENT:
75
73
                    raise
76
 
                
77
74
        os.rename(self.tmpfilename, self.realfilename)
78
75
 
79
76
 
84
81
        if self.closed:
85
82
            raise Exception('%r is already closed' % self)
86
83
 
 
84
        self.f.close()
87
85
        self.closed = True
88
 
        self.f.close()
89
 
        self.f = None
90
86
        os.remove(self.tmpfilename)
91
87
 
92
88