diff options
author | hut <hut@lavabit.com> | 2010-04-23 13:32:44 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-23 13:33:45 +0200 |
commit | c135aa1c193877d06e6a01f1445577811786f479 (patch) | |
tree | 50955de643994f110ace72a5f195e3a8fff95ad3 | |
parent | 1f2ffbb34f63ffb0440795c4a6a0b9d93b3ab84f (diff) | |
download | ranger-c135aa1c193877d06e6a01f1445577811786f479.tar.gz |
main: new function "load_apps"
-rw-r--r-- | ranger/__main__.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py index 3ae71fc0..f22c2336 100644 --- a/ranger/__main__.py +++ b/ranger/__main__.py @@ -127,6 +127,19 @@ def load_settings(fm, clean): fm.apps = apps.CustomApplications() +def load_apps(fm, clean): + if not clean: + allow_access_to_confdir(ranger.arg.confdir, True) + try: + import apps + except ImportError: + from ranger.defaults import apps + allow_access_to_confdir(ranger.arg.confdir, False) + else: + from ranger.defaults import apps + fm.apps = apps.CustomApplications() + + def main(): """initialize objects and run the filemanager""" try: |