summary refs log tree commit diff stats
path: root/ranger
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 /ranger
parent0dc911f084724af8e5a64508656c9d1ba3d3c38b (diff)
downloadranger-8f343062c2eecea85fbd0a333b3bb1f121f00213.tar.gz
ext.rifle: Trying to fix "No action found" error
Diffstat (limited to 'ranger')
-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
akspecs/ranger/commit/Makefile?h=v1.9.0b1&id=2c5ea01dd2003f172bdc5afdb8bb8bf34eccf0fa'>2c5ea01d ^
e9e4b4ff ^


2c5ea01d ^
e9e4b4ff ^







2c5ea01d ^
e9e4b4ff ^
0c2c782d ^

6ac4be61 ^
ea775b1c ^








6ac4be61 ^
ea775b1c ^

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