File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 17
17
18
18
STATUS = 0
19
19
20
-
21
20
def error_unless_permitted (env_var , message ):
22
21
global STATUS
23
22
if not os .getenv (env_var ):
24
23
sys .stderr .write (message )
25
24
STATUS = 1
26
25
27
-
28
26
def only_on (platforms ):
29
27
def decorator (func ):
30
28
@functools .wraps (func )
@@ -34,8 +32,7 @@ def inner():
34
32
return inner
35
33
return decorator
36
34
37
-
38
- @only_on (('linux' , 'darwin' , 'freebsd' , 'openbsd' ))
35
+ @only_on (['linux' , 'darwin' , 'freebsd' , 'openbsd' ])
39
36
def check_rlimit_core ():
40
37
import resource
41
38
soft , hard = resource .getrlimit (resource .RLIMIT_CORE )
@@ -46,9 +43,9 @@ def check_rlimit_core():
46
43
set ALLOW_NONZERO_RLIMIT_CORE to ignore this warning
47
44
""" % (soft ))
48
45
49
- @only_on (( 'windows' ) )
46
+ @only_on ([ 'win32' ] )
50
47
def check_console_code_page ():
51
- if " 65001" not in subprocess .check_output (['cmd' , '/c' , 'chcp' ]):
48
+ if ' 65001' not in subprocess .check_output (['cmd' , '/c' , 'chcp' ]):
52
49
sys .stderr .write ('Warning: the console output code page is not UTF-8, \
53
50
some tests may fail. Use `cmd /c "chcp 65001"` to setup UTF-8 code page.\n ' )
54
51
You can’t perform that action at this time.
0 commit comments