Load plugins in sorted order
authorEnrico Zini <enrico@enricozini.org>
Mon, 15 Jun 2009 16:04:01 +0000 (00:04 +0800)
committerEnrico Zini <enrico@enricozini.org>
Mon, 15 Jun 2009 16:04:01 +0000 (00:04 +0800)
zavai/plugins.py

index bfd512f598965b7ec6277b6b3ba748f8cff1dfe6..d7366103a14dcd775b85b0d12f1fc215af9b6bcd 100644 (file)
@@ -28,7 +28,7 @@ def load_plugins(pluginpath=None, nick="octofuss"):
        #pluginpath = "."
        pluginfiles = [fname[:-3] for fname in os.listdir(pluginpath) if fname.endswith(".py") and not fname.startswith(".") and not fname.endswith("~")]
 
-       for fname in pluginfiles:
+       for fname in sorted(pluginfiles):
                oldpath = sys.path
                try:
                        sys.path.append(os.path.abspath(pluginpath))