diff options
author | hut <hut@lavabit.com> | 2012-03-20 22:38:48 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-03-20 22:38:48 +0100 |
commit | 06a00bd0f4d9c6fb66ade2d44f63ed0e20d36365 (patch) | |
tree | a785158ff3f0908182e9f5775cc16562a1d0e9b4 /ranger | |
parent | 456bddd637bfc2a634da26e66b7818ca9b1245e7 (diff) | |
download | ranger-06a00bd0f4d9c6fb66ade2d44f63ed0e20d36365.tar.gz |
ext.rifle: use yield in Rifle.list_command
Diffstat (limited to 'ranger')
-rwxr-xr-x | ranger/ext/rifle.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py index 50d14c4b..16b22092 100755 --- a/ranger/ext/rifle.py +++ b/ranger/ext/rifle.py @@ -209,7 +209,6 @@ class Rifle(object): """ self._mimetype = mimetype count = 0 - result = [] t = time.time() for cmd, tests in self.rules: self._skip = None @@ -223,8 +222,7 @@ class Rifle(object): count += 1 else: count = self._skip - result.append((count, cmd, self._app_label, self._app_flags)) - return result + yield (count, cmd, self._app_label, self._app_flags) def execute(self, files, way=0, label=None, flags=None, mimetype=None): """ |