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):
93 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235