about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/__init__.py7
-rw-r--r--ranger/__main__.py1
-rw-r--r--test/__init__.py2
3 files changed, 5 insertions, 5 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
diff --git a/test/__init__.py b/test/__init__.py
index dc6dfc0d..29796ac1 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -18,8 +18,6 @@ import os, sys
 __all__ = [ x[0:x.index('.')] \
 		for x in os.listdir(os.path.dirname(__file__)) \
 		if x.startswith('tc_') ]
-import ranger
-ranger.arg = ranger.parse_arguments()
 
 def init():
 	sys.path.append(os.path.abspath(os.path.join(sys.path[0], '..')))