diff options
author | hut <hut@lavabit.com> | 2012-12-04 23:52:02 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-12-04 23:52:02 +0100 |
commit | f08a597557eeae1ce94e2a28565b5a0f08cb93eb (patch) | |
tree | b6cf4576ed46f287e55aad143f9fd115cb67329c /ranger | |
parent | 08cb47c2ec3d83690e61dedf5129fd07e30402e1 (diff) | |
download | ranger-f08a597557eeae1ce94e2a28565b5a0f08cb93eb.tar.gz |
core.main: only import own commands if commands.py exists
Diffstat (limited to 'ranger')
-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') |