summary refs log tree commit diff stats
path: root/ranger.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-09-29 19:08:53 +0200
committerhut <hut@lavabit.com>2010-09-29 19:08:53 +0200
commit08f08fb922672f7e24d6af8e4324169362e158b8 (patch)
tree33192c5defc82ed9c3d8963b606bd5b64643f924 /ranger.py
parentb4f09c1a287c23e9474747e5b46bc347b294026a (diff)
downloadranger-08f08fb922672f7e24d6af8e4324169362e158b8.tar.gz
Don't write any bytecode with --clean option
Diffstat (limited to 'ranger.py')
-rwxr-xr-xranger.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/ranger.py b/ranger.py
index c2e067a2..3d0f4525 100755
--- a/ranger.py
+++ b/ranger.py
@@ -33,6 +33,16 @@ fi
 return 1
 """
 
+import sys
+
+# When using the --clean option, not even bytecode should be written.
+# Need to find out if --clean is used as soon as possible.
+try:
+	argv = sys.argv[0:sys.argv.index('--')]
+except:
+	argv = sys.argv
+sys.dont_write_bytecode = '-c' in argv or '--clean' in argv
+
 # Set the actual docstring
 __doc__ = """Ranger - file browser for the unix terminal"""