diff options
Diffstat (limited to 'ranger')
-rwxr-xr-x[-rw-r--r--] | ranger | 21 |
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() |