summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-02-17 23:48:12 +0100
committerhut <hut@lepus.uberspace.de>2015-02-17 23:50:06 +0100
commit370c270d14e2354aefeae878a58e1f34b3647839 (patch)
tree8f709df83c64b68d9915ba03622357b168065976 /ranger
parent6064846f084b30592ee2f8c8ef9bc1be9e1438a4 (diff)
downloadranger-370c270d14e2354aefeae878a58e1f34b3647839.tar.gz
core.main: avoid creating ~/.config/ranger/commands.pyc
This fixes #248 (Cached python should not be stored in .config)
Diffstat (limited to 'ranger')
-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)