summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 9c9ee01b..2a3cb48f 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -254,11 +254,14 @@ def load_settings(fm, clean):
 
         # Load custom commands
         if os.path.exists(fm.confpath('commands.py')):
+            old_bytecode_setting = sys.dont_write_bytecode
+            sys.dont_write_bytecode = True
             try:
                 import commands
                 fm.commands.load_commands_from_module(commands)
             except ImportError:
                 pass
+            sys.dont_write_bytecode = old_bytecode_setting
 
         allow_access_to_confdir(ranger.arg.confdir, False)