summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-12 00:46:26 +0100
committerhut <hut@lavabit.com>2010-03-12 00:46:48 +0100
commit39edded7b8dcc7a65955bf69e30182dd80f2de09 (patch)
treeb17d843039de9547236f4bd6db8d0141dcba88ca /ranger
parent9ae98698dcc967b6ccecc461ac27d7f6461ee0d2 (diff)
downloadranger-39edded7b8dcc7a65955bf69e30182dd80f2de09.tar.gz
ranger.__init__: set a default value for arg
Diffstat (limited to 'ranger')
-rw-r--r--ranger/__init__.py7
-rw-r--r--ranger/__main__.py1
2 files changed, 5 insertions, 3 deletions
diff --git a/ranger/__init__.py b/ranger/__init__.py
index f4a54279..21825ea8 100644
--- a/ranger/__init__.py
+++ b/ranger/__init__.py
@@ -17,6 +17,7 @@
 
 import os
 import sys
+from ranger.ext.openstruct import OpenStruct
 
 __license__ = 'GPL3'
 __version__ = '1.0.3'
@@ -29,11 +30,13 @@ __copyright__ = """
 Copyright (C) 2009, 2010  Roman Zimbelmann <romanz@lavabit.com>
 """
 
-arg = None
 USAGE = '%prog [options] [path/filename]'
 DEFAULT_CONFDIR = '~/.ranger'
 RANGERDIR = os.path.dirname(__file__)
 LOGFILE = '/tmp/errorlog'
+arg = OpenStruct(cd_after_exit=False,
+		debug=False, clean=False, confdir=DEFAULT_CONFDIR,
+		mode=0, flags='', targets=[])
 
 #for python3-only versions, this could be replaced with:
 #def log(*objects, start='ranger:', sep=' ', end='\n'):
@@ -63,4 +66,4 @@ def relpath(*paths):
 	return os.path.join(RANGERDIR, *paths)
 
 
-from ranger.__main__ import main, parse_arguments
+from ranger.__main__ import main
diff --git a/ranger/__main__.py b/ranger/__main__.py
index dba229bc..361f9455 100644
--- a/ranger/__main__.py
+++ b/ranger/__main__.py
@@ -73,7 +73,6 @@ def parse_arguments():
 			raise SystemExit()
 
 	if not arg.clean:
-#		sys.path[0:0] = (arg.confdir, )
 		sys.path.append(arg.confdir)
 
 	return arg
/subx/build?h=main&id=f898ee7a374c20f58150158a5066f547060d9c24'>f898ee7a ^
6e1eeeeb ^
248e789e ^

72f278ae ^
9e5e87ca ^
248e789e ^
9e5e87ca ^
248e789e ^

9e5e87ca ^


248e789e ^
9e5e87ca ^

75f2c123 ^

248e789e ^
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
96
97
98
99
100
101
102
103