summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-03-21 10:55:38 +0100
committerhut <hut@lavabit.com>2012-03-21 10:55:38 +0100
commit8f343062c2eecea85fbd0a333b3bb1f121f00213 (patch)
tree475e94e9fab4aab6252c477e4742df3c7a46cd40
parent0dc911f084724af8e5a64508656c9d1ba3d3c38b (diff)
downloadranger-8f343062c2eecea85fbd0a333b3bb1f121f00213.tar.gz
ext.rifle: Trying to fix "No action found" error
-rwxr-xr-xranger/ext/rifle.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index ea2a489c..f2dacf79 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -245,6 +245,7 @@ class Rifle(object):
 		the "p" flag is negated and the "f" flag is added, resulting in "wf".
 		"""
 		command = None
+		found_at_least_one = None
 
 		# Determine command
 		for count, cmd, lbl, flags in self.list_commands(files, mimetype):
@@ -252,13 +253,15 @@ class Rifle(object):
 				cmd = self.hook_command_preprocessing(cmd)
 				command = self._build_command(files, cmd, flags)
 				break
+			else:
+				found_at_least_one = True
 
 		# Execute command
 		if command is None:
-			if count <= 0 or way <= 0:
-				self.hook_logger("No action found.")
-			else:
+			if found_at_least_one:
 				self.hook_logger("Method number %d is undefined." % way)
+			else:
+				self.hook_logger("No action found.")
 		else:
 			if 'PAGER' not in os.environ:
 				os.environ['PAGER'] = DEFAULT_PAGER
santi/profani-tty/commit/themes/original_bright?id=fa3c6779a0cb89b96513206f11b2a5e595f4b8d7'>fa3c6779 ^
a4b4ed71 ^
30b5f112 ^




fa3c6779 ^





30b5f112 ^
71679a31 ^

fa3c6779 ^
30b5f112 ^
fa3c6779 ^
fa3c6779 ^

2f82f50a ^
86c1c388 ^
1a3dc91e ^
fa3c6779 ^

fa3c6779 ^
fbc30231 ^

















cd2458c0 ^

0ae975c2 ^

fa3c6779 ^
b21edfaa ^
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