diff options
-rw-r--r-- | ranger/core/main.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py index dd07bff8..4af9495e 100644 --- a/ranger/core/main.py +++ b/ranger/core/main.py @@ -245,11 +245,12 @@ def load_settings(fm, clean): allow_access_to_confdir(ranger.arg.confdir, True) # Load custom commands - try: - import commands - fm.commands.load_commands_from_module(commands) - except ImportError: - pass + if os.path.exists(fm.confpath('commands.py')): + try: + import commands + fm.commands.load_commands_from_module(commands) + except ImportError: + pass # Load rc.conf custom_conf = fm.confpath('rc.conf') |