summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2016-06-22 16:21:08 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2016-06-22 16:27:03 +0200
commit87f8bec4c8146b5d5759e3ad13432051bbe0902d (patch)
tree20f7c291ad83f0c5e1b191fa744acdcac7ca1839 /ranger
parentdb6866797bd91b8dde8ecd535ab1a490a1d200db (diff)
downloadranger-87f8bec4c8146b5d5759e3ad13432051bbe0902d.tar.gz
Revert "use importlib to load pugins, and try to load commands from them"
This reverts commit cbe0062dfe75b50be1eecf7501d5331d07701d37.

It was breaking the compatibility with Python 2.6.
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/main.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py
index fefffad5..dcded8d7 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -6,7 +6,6 @@
 import os.path
 import sys
 import tempfile
-import importlib
 
 
 def main():
@@ -304,8 +303,7 @@ def load_settings(fm, clean):
             ranger.fm = fm
             for plugin in sorted(plugins):
                 try:
-                    module = importlib.import_module('plugins.' + plugin)
-                    fm.commands.load_commands_from_module(module)
+                    module = __import__('plugins', fromlist=[plugin])
                     fm.log.append("Loaded plugin '%s'." % plugin)
                 except Exception as e:
                     fm.log.append("Error in plugin '%s'" % plugin)