Ignore:
Timestamp:
Dec 26, 2018, 8:00:40 PM (6 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Remove positional argument specifiers for `format`

In strings for `format` calls, remove the digits for positional
arguments. For example, "{0}, {1}" becomes "{}, {}".
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ftputil/host.py

    r1718 r1723  
    222222            # Similarly to a failed `file` in a local file system,
    223223            # raise an `IOError`, not an `OSError`.
    224             raise ftputil.error.FTPIOError("remote directory '{0}' doesn't "
     224            raise ftputil.error.FTPIOError("remote directory '{}' doesn't "
    225225                    "exist or has insufficient access rights".
    226226                    format(effective_dir))
     
    392392        except ftputil.error.FTPIOError:
    393393            raise ftputil.error.TimeShiftError(
    394                     """couldn't write helper file in directory '{0}'""".
     394                    """couldn't write helper file in directory '{}'""".
    395395                    format(self.getcwd()))
    396396        # If everything worked up to here it should be possible to stat
     
    562562        except ftputil.error.PermanentError:
    563563            raise ftputil.error.InaccessibleLoginDirError(
    564                     "directory '{0}' is not accessible".
     564                    "directory '{}' is not accessible".
    565565                    format(presumable_login_dir))
    566566
     
    693693        path = self.path.abspath(path)
    694694        if self.listdir(path):
    695             raise ftputil.error.PermanentError("directory '{0}' not empty".
     695            raise ftputil.error.PermanentError("directory '{}' not empty".
    696696                                               format(path))
    697697        #XXX How does `rmd` work with links?
Note: See TracChangeset for help on using the changeset viewer.