summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-11-25 17:55:34 +0100
committerhut <hut@lavabit.com>2009-11-25 17:55:34 +0100
commit5822dff7d91472bf2fc337c68f144e0ce1de09ae (patch)
tree7d40218b67f13c9c95141aa5bcb4aa292c42924a /ranger
parentcfbb8c84355f28bc7f669105f90c7aae0a972569 (diff)
downloadranger-5822dff7d91472bf2fc337c68f144e0ce1de09ae.tar.gz
implemented more stuff
Diffstat (limited to 'ranger')
-rwxr-xr-x[-rw-r--r--]ranger21
1 files changed, 14 insertions, 7 deletions
diff --git a/ranger b/ranger
index b6050ca8..d83e8a3e 100644..100755
--- a/ranger
+++ b/ranger
@@ -3,7 +3,7 @@
 
 # TODO: cd after exit
 
-from code import debug, fm, ui, options, environment
+from code import debug, fm, defaultui, options, environment
 
 # TODO: find out the real name of this script and include files relative to here
 
@@ -16,12 +16,19 @@ def main():
 	os.stat_float_times(True)
 	locale.setlocale(locale.LC_ALL, 'en_US.utf8')
 
-	path = '/srv/music/compilations/'
-	opt = options.get()
-	env = environment.Environment()
+	try:
+		path = '/srv/music/compilations/'
+		opt = options.get()
+		env = environment.Environment(opt)
+
+		my_ui = defaultui.DefaultUI(env)
+		my_fm = fm.FM(env)
+		my_fm.feed(path, my_ui)
+		my_fm.run()
+
+	except:
+		my_ui.exit()
+		raise
 
-	my_fm = fm.FM(opt, env)
-	my_fm.setup(path, ui.UI(opt))
-	my_fm.run()
 
 if __name__ == "__main__": main()