aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libbe/util/plugin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbe/util/plugin.py b/libbe/util/plugin.py
index ba563eb..ca5686d 100644
--- a/libbe/util/plugin.py
+++ b/libbe/util/plugin.py
@@ -75,7 +75,9 @@ def modnames(prefix):
else:
modfiles = os.listdir(os.path.join(_PLUGIN_PATH, *components))
# normalize .py/.pyc extensions and sort
- modfiles = sorted(set(os.path.splitext(f)[0] + '.py' for f in modfiles))
+ base_ext = [os.path.splitext(f) for f in modfiles]
+ modfiles = sorted(set(
+ base + '.py' for base,ext in base_ext if ext in ['.py', '.pyc']))
for modfile in modfiles:
if modfile.startswith('.') or not modfile:
continue # the occasional emacs temporary file or .* file