~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Matt Nordhoff
  • Date: 2009-06-23 05:12:07 UTC
  • mto: This revision was merged to the branch mainline in revision 4474.
  • Revision ID: mnordhoff@mattnordhoff.com-20090623051207-fksdtbzkwtnrw9dd
Update _add_text docstrings that still referred to add_text.

Show diffs side-by-side

added added

removed removed

Lines of Context:
204
204
        except (IOError, OSError),e:
205
205
            self._translate_error(e, path)
206
206
        try:
207
 
            if bytes:
208
 
                fp.write(bytes)
 
207
            fp.write(bytes)
209
208
            fp.commit()
210
209
        finally:
211
210
            fp.close()
286
285
    def put_bytes_non_atomic(self, relpath, bytes, mode=None,
287
286
                             create_parent_dir=False, dir_mode=None):
288
287
        def writer(fd):
289
 
            if bytes:
290
 
                os.write(fd, bytes)
 
288
            os.write(fd, bytes)
291
289
        self._put_non_atomic_helper(relpath, writer, mode=mode,
292
290
                                    create_parent_dir=create_parent_dir,
293
291
                                    dir_mode=dir_mode)
372
370
        file_abspath, fd = self._get_append_file(relpath, mode=mode)
373
371
        try:
374
372
            result = self._check_mode_and_size(file_abspath, fd, mode=mode)
375
 
            if bytes:
376
 
                os.write(fd, bytes)
 
373
            os.write(fd, bytes)
377
374
        finally:
378
375
            os.close(fd)
379
376
        return result