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):
idbong/suckless/dwm/blame/dwm.1?h=1.3&id=f60c597d653bd7eab6c620fc53d732ca75f6a880'>^
e743836 ^
dc5c070 ^




901b3ed ^
1076f2b

901b3ed ^
0c3544d ^
72655f0 ^





dbcf87c ^
72655f0 ^
3af6434 ^
72655f0 ^
dbcf87c ^
72655f0 ^


dbcf87c ^
72655f0 ^
3af6434 ^

dbcf87c ^
3af6434 ^


dbcf87c ^
3af6434 ^
72655f0 ^

dbcf87c ^
72655f0 ^


dbcf87c ^
72655f0 ^

7b5638f ^




dbcf87c ^
1549faf ^


3af6434 ^

dbcf87c ^
1549faf ^


dbcf87c ^
1549faf ^


dbcf87c ^
1549faf ^
ba59bc8 ^
1549faf ^
3af6434 ^

dbcf87c ^
0c3544d ^
0e5c819 ^


dbcf87c ^
0e5c819 ^


dbcf87c ^
0e5c819 ^



dbcf87c ^
0c3544d ^

dc5c070 ^

5ef6ef1 ^

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
101
102
103
104
105
106
107
108
109
110
111
112