diff options
author | nfnty <git@nfnty.se> | 2016-12-23 11:25:10 +0100 |
---|---|---|
committer | nfnty <git@nfnty.se> | 2017-01-17 05:59:02 +0100 |
commit | 916c239014b95f02bf045f8de0488d7614126edf (patch) | |
tree | 6dce2d3bfcbd8ed76363c8a9f66f0efa3277ca58 /ranger/config/commands.py | |
parent | b3d031a913814900467358b2adf20a148bf6de1a (diff) | |
download | ranger-916c239014b95f02bf045f8de0488d7614126edf.tar.gz |
linting: Python 2 compat
Diffstat (limited to 'ranger/config/commands.py')
-rwxr-xr-x | ranger/config/commands.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index a3a44278..98af27e3 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -142,7 +142,7 @@ class cd(Command): else: self.fm.cd(destination) - def tab(self, tabnum): + def tab(self, tabnum): # pylint: disable=too-many-locals from os.path import dirname, basename, expanduser, join cwd = self.fm.thisdir.path @@ -836,9 +836,9 @@ class chmod(Command): self.fm.notify("Need an octal number between 0 and 777!", bad=True) return - for file in self.fm.thistab.get_selection(): + for fobj in self.fm.thistab.get_selection(): try: - os.chmod(file.path, mode) + os.chmod(fobj.path, mode) except Exception as ex: self.fm.notify(ex) @@ -1466,8 +1466,8 @@ class meta(prompt_metadata): if key in metadata and metadata[key]: return [" ".join([self.arg(0), self.arg(1), metadata[key]])] else: - return [self.arg(0) + " " + key for key in sorted(metadata) - if key.startswith(self.arg(1))] + return [self.arg(0) + " " + k for k in sorted(metadata) + if k.startswith(self.arg(1))] class linemode(default_linemode): |