~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/ftp/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2009-02-23 15:29:35 UTC
  • mfrom: (3943.7.7 bzr.code_style_cleanup)
  • mto: This revision was merged to the branch mainline in revision 4033.
  • Revision ID: john@arbash-meinel.com-20090223152935-oel9m92mwcc6nb4h
Merge the removal of all trailing whitespace, and resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
 
196
196
        if unknown_exc:
197
197
            raise unknown_exc(path, extra=extra)
198
 
        # TODO: jam 20060516 Consider re-raising the error wrapped in 
 
198
        # TODO: jam 20060516 Consider re-raising the error wrapped in
199
199
        #       something like TransportError, but this loses the traceback
200
200
        #       Also, 'sftp' has a generic 'Failure' mode, which we use failure_exc
201
201
        #       to handle. Consider doing something like that here.
401
401
 
402
402
    def _try_append(self, relpath, text, mode=None, retries=0):
403
403
        """Try repeatedly to append the given text to the file at relpath.
404
 
        
 
404
 
405
405
        This is a recursive function. On errors, it will be called until the
406
406
        number of retries is exceeded.
407
407
        """
476
476
            self._rename_and_overwrite(abs_from, abs_to, f)
477
477
        except ftplib.error_perm, e:
478
478
            self._translate_perm_error(e, abs_from,
479
 
                extra='unable to rename to %r' % (rel_to,), 
 
479
                extra='unable to rename to %r' % (rel_to,),
480
480
                unknown_exc=errors.PathError)
481
481
 
482
482
    def _rename_and_overwrite(self, abs_from, abs_to, f):