summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/apps.py2
-rw-r--r--ranger/defaults/keys.py2
-rw-r--r--ranger/fsobject/fsobject.py11
3 files changed, 8 insertions, 7 deletions
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py
index 01f11f24..e2def3d3 100644
--- a/ranger/defaults/apps.py
+++ b/ranger/defaults/apps.py
@@ -83,8 +83,6 @@ class CustomApplications(Applications):
 		if f.document or f.filetype.startswith('text'):
 			return self.app_editor(c)
 
-		raise Exception(f.filetype)
-
 
 	# ----------------------------------------- application definitions
 	def app_pager(self, c):
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index a573279c..9c615933 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -15,7 +15,7 @@
 
 """
 This is the default key configuration file of ranger.
-Syntax for binding keys: bind(*keys, fnc)
+Syntax for binding keys: map(*keys, fnc)
 
 keys are one or more key-combinations which are either:
 * a string
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index 8ad6d489..49936c3f 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -91,10 +91,13 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 	def filetype(self):
 		if self._filetype is None:
 			import subprocess
-			got = subprocess.Popen(["file", '-Lb', '--mime-type', self.path],\
-					stdout=subprocess.PIPE) \
-					.communicate()[0]
-			self._filetype = got
+			try:
+				got = subprocess.Popen(["file", '-Lb', '--mime-type',\
+						self.path], stdout=subprocess.PIPE).communicate()[0]
+			except OSError:
+				self._filetype = ''
+			else:
+				self._filetype = got
 		return self._filetype
 
 	def get_description(self):
ision' href='/akkartik/mu/blame/vimrc.vim?h=main&id=d803b68769947a419ef176d5c80446fcba5e9ee3'>^
6e1eeeeb ^
a9817844 ^
b96af395 ^






6e1eeeeb ^
6e1eeeeb ^









113bae73 ^
6e1eeeeb ^










aeac1e06 ^
6e1eeeeb ^
aeac1e06 ^
6e1eeeeb ^


a56d969e ^
f88f77cd ^
6e1eeeeb ^
4c131b38 ^
2844327a ^
f88f77cd ^
2844327a ^



a5fa9785 ^
2844327a ^
eafdbfc1 ^
2844327a ^

2844327a ^


a5fa9785 ^
2844327a ^
4c131b38 ^
2844327a ^








6e1eeeeb ^
6e1eeeeb ^




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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100