summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPino Toscano <toscano.pino@tiscali.it>2011-09-17 15:02:44 +0200
committerhut <hut@lavabit.com>2011-09-17 21:46:25 +0200
commitb86e3c3c4e3a029834176eaa5ae2eefb769ced1b (patch)
treefb3682c2507a7407a1cfe10aa0470319486379d8
parent98761094d8e9f43fae4342e44c2bcdc6dea59331 (diff)
downloadranger-b86e3c3c4e3a029834176eaa5ae2eefb769ced1b.tar.gz
use errno.EEXIST
... instead of its raw value (on Linux, for example)
-rw-r--r--ranger/core/helper.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/core/helper.py b/ranger/core/helper.py
index cb0afefe..ad5541f5 100644
--- a/ranger/core/helper.py
+++ b/ranger/core/helper.py
@@ -15,6 +15,7 @@
 
 """Helper functions"""
 
+from errno import EEXIST
 import os.path
 import sys
 from ranger import *
@@ -150,7 +151,7 @@ def allow_access_to_confdir(confdir, allow):
 		try:
 			os.makedirs(confdir)
 		except OSError as err:
-			if err.errno != 17:  # 17 means it already exists
+			if err.errno != EEXIST:  # EEXIST means it already exists
 				print("This configuration directory could not be created:")
 				print(confdir)
 				print("To run ranger without the need for configuration")
r hut <hut@lavabit.com> 2010-01-13 05:51:27 +0100 committer hut <hut@lavabit.com> 2010-01-13 05:51:27 +0100 updated pydoc documentation' href='/akspecs/ranger/commit/doc/pydoc/ranger.gui.curses_shortcuts.html?h=v1.9.0b1&id=b3556b21e23eb3381b220e0d3319d94b3a89e0ac'>b3556b21 ^
62cd83ba ^






4c13e1f2 ^















34a60763 ^
4c13e1f2 ^






















34a60763 ^
4c13e1f2 ^






34a60763 ^
4c13e1f2 ^
34a60763 ^
4c13e1f2 ^












62cd83ba ^
4c13e1f2 ^
b3556b21 ^
4c13e1f2 ^
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