about summary refs log tree commit diff stats
path: root/ranger/gui/widgets/browsercolumn.py
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2018-06-17 15:07:56 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2018-06-17 15:07:56 +0200
commit325f41e6a841ab1413020b9d2d86c3922d90f407 (patch)
tree71c5c8c45993c91fe564ab9da98c2ea94cff82f2 /ranger/gui/widgets/browsercolumn.py
parent835065f2819f2dde2426e203996c12862a97d3f8 (diff)
downloadranger-325f41e6a841ab1413020b9d2d86c3922d90f407.tar.gz
Fix the issues reported by the coverage test (#1206)
Regarding the change in ranger/core/runner.py: setting the 'f' flag
causes the 'r' flag to run sudo -b which forks on it own so it should
be safe to not explicitly fork in this case.
Diffstat (limited to 'ranger/gui/widgets/browsercolumn.py')
-rw-r--r--ranger/gui/widgets/browsercolumn.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/gui/widgets/browsercolumn.py b/ranger/gui/widgets/browsercolumn.py
index 95260813..bc6f7b1b 100644
--- a/ranger/gui/widgets/browsercolumn.py
+++ b/ranger/gui/widgets/browsercolumn.py
@@ -189,12 +189,12 @@ class BrowserColumn(Pager):  # pylint: disable=too-many-instance-attributes
     def _draw_file(self):
         """Draw a preview of the file, if the settings allow it"""
         self.win.move(0, 0)
-        if not self.target.accessible:
-            self.addnstr("not accessible", self.wid)
+        if self.target is None or not self.target.has_preview():
             Pager.close(self)
             return
 
-        if self.target is None or not self.target.has_preview():
+        if not self.target.accessible:
+            self.addnstr("not accessible", self.wid)
             Pager.close(self)
             return