diff options
author | hut <hut@lavabit.com> | 2010-03-12 19:20:57 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-12 19:20:57 +0100 |
commit | 5d4f9249860ea66b929a3a0c4d215cf35067b5f8 (patch) | |
tree | 8dba280707f9cea6a46d78413494b4525f766327 | |
parent | 7582555b50f058b316c04ce8ab977bed36da1585 (diff) | |
download | ranger-5d4f9249860ea66b929a3a0c4d215cf35067b5f8.tar.gz |
ranger.main: don't create ~/.ranger if --clean is specified
-rw-r--r-- | ranger/__main__.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py index aa0785e3..9c97e190 100644 --- a/ranger/__main__.py +++ b/ranger/__main__.py @@ -62,17 +62,17 @@ def parse_arguments(): if arg.cd_after_exit: sys.stderr = sys.__stdout__ - try: - os.makedirs(arg.confdir) - except OSError as err: - if err.errno != 17: # 17 means it already exists - print("This configuration directory could not be created:") - print(arg.confdir) - print("To run ranger without the need for configuration files") - print("use the --clean option (not implemented yet)") - raise SystemExit() - if not arg.clean: + try: + os.makedirs(arg.confdir) + except OSError as err: + if err.errno != 17: # 17 means it already exists + print("This configuration directory could not be created:") + print(arg.confdir) + print("To run ranger without the need for configuration files") + print("use the --clean option.") + raise SystemExit() + sys.path.append(arg.confdir) return arg |