summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-09-28 21:25:31 +0200
committerhut <hut@lavabit.com>2011-09-28 21:25:31 +0200
commit99400080aa6206cbae1895e3b9800124f94e3d7a (patch)
treeb6ef21831b91d67a45a09162e40f0874bb9d0265
parent911a89fc2458fe2b5a34d0612ee978acc333e6e8 (diff)
downloadranger-99400080aa6206cbae1895e3b9800124f94e3d7a.tar.gz
minor optimization in ranger.py
-rwxr-xr-xranger.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/ranger.py b/ranger.py
index c4f68923..cc402a44 100755
--- a/ranger.py
+++ b/ranger.py
@@ -1,7 +1,5 @@
 #!/usr/bin/python -O
 # -*- coding: utf-8 -*-
-#
-# Ranger: Explore your forest of files from inside your terminal
 # Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
 #
 # This program is free software: you can redistribute it and/or modify
@@ -40,10 +38,7 @@ import os.path
 
 # Need to find out whether or not the flag --clean was used ASAP,
 # because --clean is supposed to disable bytecode compilation
-try:
-	argv = sys.argv[0:sys.argv.index('--')]
-except:
-	argv = sys.argv
+argv = sys.argv[1:sys.argv.index('--')] if '--' in sys.argv else sys.argv[1:]
 sys.dont_write_bytecode = '-c' in argv or '--clean' in argv
 
 # Set the actual docstring
n139'>139
'>81f5ac9e ^
cbcd3325 ^
d3bcb234 ^

cbcd3325 ^
81f5ac9e ^











cbcd3325 ^
90018274 ^




cbcd3325 ^
95e021ae ^

c928a9eb ^
95e021ae ^
cbcd3325 ^
95e021ae ^















1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95