Ignore:
Timestamp:
Jul 29, 2013, 10:06:22 AM (6 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Indented continuation lines, especially in `raise` statements.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/host.py

    r1301 r1302  
    185185            # raise an `IOError`, not an `OSError`.
    186186            raise ftputil.error.FTPIOError("remote directory '{0}' doesn't "
    187                   "exist or has insufficient access rights".
    188                   format(effective_dir))
     187                    "exist or has insufficient access rights".
     188                    format(effective_dir))
    189189        host._file._open(effective_file, mode)
    190190        if 'w' in mode:
     
    318318           maximum_deviation:
    319319            raise ftputil.error.TimeShiftError(
    320                   "time shift ({0:.2f} s) deviates more than {1:d} s "
    321                   "from full hours".format(time_shift, int(maximum_deviation)))
     320                    "time shift ({0:.2f} s) deviates more than {1:d} s "
     321                    "from full hours".format(
     322                      time_shift, int(maximum_deviation)))
    322323
    323324    def synchronize_times(self):
     
    352353        except ftputil.error.FTPIOError:
    353354            raise ftputil.error.TimeShiftError(
    354                   '''couldn't write helper file in directory "{0}"'''.
    355                   format(self.getcwd()))
     355                    '''couldn't write helper file in directory "{0}"'''.
     356                    format(self.getcwd()))
    356357        # If everything worked up to here it should be possible to stat
    357358        # and then remove the just-written file.
     
    367368            # written to.
    368369            raise ftputil.error.TimeShiftError(
    369                   "could write helper file but not unlink it")
     370                    "could write helper file but not unlink it")
    370371        # Calculate the difference between server and client.
    371372        now = time.time()
     
    517518        except ftputil.error.PermanentError:
    518519            raise ftputil.error.InaccessibleLoginDirError(
    519                   "directory '{0}' is not accessible".
    520                   format(presumable_login_dir))
     520                    "directory '{0}' is not accessible".
     521                    format(presumable_login_dir))
    521522
    522523    def _robust_ftp_command(self, command, path, descend_deeply=False):
     
    662663        else:
    663664            raise ftputil.error.PermanentError(
    664                   "remove/unlink can only delete files and links, "
    665                   "not directories")
     665                    "remove/unlink can only delete files and links, "
     666                    "not directories")
    666667        self.stat_cache.invalidate(path)
    667668
     
    891892
    892893    def __exit__(self, exc_type, exc_val, exc_tb):
    893         # We don't need the `exc_*` arguments here
     894        # We don't need the `exc_*` arguments here.
    894895        # pylint: disable=W0613
    895896        self.close()
Note: See TracChangeset for help on using the changeset viewer.