summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/linemode.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ranger/core/linemode.py b/ranger/core/linemode.py
index b7aef23f..be559578 100644
--- a/ranger/core/linemode.py
+++ b/ranger/core/linemode.py
@@ -97,8 +97,11 @@ class FileInfoLinemode(LinemodeBase):
 
     def infostring(self, file, metadata):
         if not file.is_directory:
-            from subprocess import check_output
-            fileinfo = check_output(["file", "-bL", file.path]).strip()
+            from subprocess import check_output, CalledProcessError
+            try:
+                fileinfo = check_output(["file", "-bL", file.path]).strip()
+            except CalledProcessError:
+                return "unknown"
             if sys.version_info[0] >= 3:
                 fileinfo = fileinfo.decode("utf-8")
             return fileinfo
t optional in embedded bash script' href='/akspecs/ranger/commit/ranger.py?h=v1.8.0&id=06848dc3f83e940cf26342a5b6dfeb31c88e1f06'>06848dc3 ^
d1a1173d ^
8fa87054 ^
e2393938 ^
06848dc3 ^
240394a4 ^
f027adc0 ^
08f08fb9 ^
654af129 ^
08f08fb9 ^
d8084b41 ^

99400080 ^
08f08fb9 ^

654af129 ^

d1a1173d ^
d8084b41 ^
cba63cf3 ^
b4250dbc ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39