[kupfer] plugin.google: Use os.listdir
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] plugin.google: Use os.listdir
- Date: Thu, 10 Sep 2009 22:36:44 +0000 (UTC)
commit c325cf05914e6935e6d8fd01da435d5cf9f6c64e
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Thu Sep 10 23:05:17 2009 +0200
plugin.google: Use os.listdir
kupfer/plugin/google.py | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/kupfer/plugin/google.py b/kupfer/plugin/google.py
index 83a11f4..cfb7fe8 100644
--- a/kupfer/plugin/google.py
+++ b/kupfer/plugin/google.py
@@ -191,11 +191,6 @@ class OpenSearchSource (Source):
self.output_debug("Found following searchplugins directories",
sep="\n", *plugin_dirs)
- def listfiles(directory):
- """Return a list of files in @directory, without recursing"""
- for dirname, dirs, files in os.walk(directory):
- return files
-
@coroutine
def collect(seq):
"""Collect items in list @seq"""
@@ -208,7 +203,7 @@ class OpenSearchSource (Source):
# files are unique by filename to allow override
visited_files = set()
for pdir in plugin_dirs:
- for f in listfiles(pdir):
+ for f in os.listdir(pdir):
if f in visited_files:
continue
parser.send(os.path.join(pdir, f))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]