diff options
author | hut <hut@lepus.uberspace.de> | 2016-05-24 15:13:17 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2016-05-24 15:13:17 +0200 |
commit | e9091956d414bf599d9a3c5f452dc345f72e92ba (patch) | |
tree | b809d6dd4358af8ffd969e03c3db1606dc4a49de | |
parent | c84710880dff3c591019ab235d8021fc259e886a (diff) | |
parent | cbe0062dfe75b50be1eecf7501d5331d07701d37 (diff) | |
download | ranger-e9091956d414bf599d9a3c5f452dc345f72e92ba.tar.gz |
Merge branch 'fix-plugin-import' of https://github.com/dflupu/ranger
-rw-r--r-- | ranger/core/main.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py index 39d682f7..2972a1eb 100644 --- a/ranger/core/main.py +++ b/ranger/core/main.py @@ -6,6 +6,7 @@ import os.path import sys import tempfile +import importlib def main(): """initialize objects and run the filemanager""" @@ -301,7 +302,8 @@ def load_settings(fm, clean): ranger.fm = fm for plugin in sorted(plugins): try: - module = __import__('plugins', fromlist=[plugin]) + module = importlib.import_module('plugins.' + plugin) + fm.commands.load_commands_from_module(module) fm.log.append("Loaded plugin '%s'." % plugin) except Exception as e: fm.log.append("Error in plugin '%s'" % plugin) |