summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-12 19:20:57 +0100
committerhut <hut@lavabit.com>2010-03-12 19:20:57 +0100
commit5d4f9249860ea66b929a3a0c4d215cf35067b5f8 (patch)
tree8dba280707f9cea6a46d78413494b4525f766327
parent7582555b50f058b316c04ce8ab977bed36da1585 (diff)
downloadranger-5d4f9249860ea66b929a3a0c4d215cf35067b5f8.tar.gz
ranger.main: don't create ~/.ranger if --clean is specified
-rw-r--r--ranger/__main__.py20
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
-0400 committer Ben Morrison <ben@gbmor.dev> 2019-06-08 02:29:20 -0400 database refs and static assets concurrency-safe' href='/gbmor/getwtxt/commit/svc/cache.go?h=v0.4.15&id=e9d4a6b0e8624c6425d467f0efe14be1bc683bd9'>e9d4a6b ^
4695425 ^





7410b8c ^







1a15258 ^
d6d0c18 ^




c896e6b ^

711012e ^

c896e6b ^

1a15258 ^
c896e6b ^

1a15258 ^
78f4d8a ^
c896e6b ^
fdbc01d ^
c896e6b ^


c896e6b ^

c6ced3e ^




d6d0c18 ^
c38385c ^
c6ced3e ^
78f4d8a ^
c6ced3e ^
c896e6b ^
d6d0c18 ^
c896e6b ^
8b6ab99 ^
c896e6b ^
78f4d8a ^
c896e6b ^
8b6ab99 ^
cd635e6 ^


c896e6b ^

2b0d4a5 ^




69217dd ^




6c1b09b ^
25972a6 ^
69217dd ^
6c1b09b ^
25972a6 ^
e9d4a6b ^
25972a6 ^

e9d4a6b ^
25972a6 ^

f316396 ^

25972a6 ^

2b0d4a5 ^
25972a6 ^
78f4d8a ^
25972a6 ^
2b0d4a5 ^
e9d4a6b ^
25972a6 ^

e9d4a6b ^
25972a6 ^
2b0d4a5 ^
2b0d4a5 ^

69217dd ^
6c1b09b ^
2b0d4a5 ^
e9d4a6b ^
2b0d4a5 ^

e9d4a6b ^
2b0d4a5 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129