diff options
author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2016-06-22 16:21:08 +0200 |
---|---|---|
committer | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2016-06-22 16:27:03 +0200 |
commit | 87f8bec4c8146b5d5759e3ad13432051bbe0902d (patch) | |
tree | 20f7c291ad83f0c5e1b191fa744acdcac7ca1839 | |
parent | db6866797bd91b8dde8ecd535ab1a490a1d200db (diff) | |
download | ranger-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.
-rw-r--r-- | ranger/core/main.py | 4 |
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) |