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