summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-15 03:33:07 +0100
committerhut <hut@lavabit.com>2010-03-15 03:33:07 +0100
commit94bfe9145e4a5e9b6267aca967fa9db97bf9c423 (patch)
tree60caad9e8e0c28eff17f3c1f5476c5512c846584
parenta44749f63848740e95d1f168d73300c874ecf6c5 (diff)
downloadranger-94bfe9145e4a5e9b6267aca967fa9db97bf9c423.tar.gz
slight corrections
-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):