Skip to content

Commit c4b72a8

Browse files
committed
sancheck: import resource inside of the posix check
This avoids a crash on windows
1 parent dc630d0 commit c4b72a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/etc/check-sanitycheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import os
1414
import sys
1515
import functools
16-
import resource
1716

1817
STATUS = 0
1918

@@ -37,6 +36,7 @@ def inner():
3736

3837
@only_on(('linux', 'darwin', 'freebsd', 'openbsd'))
3938
def check_rlimit_core():
39+
import resource
4040
soft, hard = resource.getrlimit(resource.RLIMIT_CORE)
4141
if soft > 0:
4242
error_unless_permitted('ALLOW_NONZERO_RLIMIT_CORE', """\

0 commit comments

Comments
 (0)