Browse code

Don't load plugins starting with "_".

Michael DeHaan authored on 2012/09/07 07:46:15
Showing 1 changed files
... ...
@@ -486,7 +486,8 @@ def import_plugins(directory):
486 486
     modules = {}
487 487
     for path in glob.glob(os.path.join(directory, '*.py')): 
488 488
         name, ext = os.path.splitext(os.path.basename(path))
489
-        modules[name] = imp.load_source(name, path)
489
+        if not name.startswith("_"):
490
+            modules[name] = imp.load_source(name, path)
490 491
     return modules
491 492
 
492 493