sancheck: import resource inside of the posix check
This avoids a crash on windows
This commit is contained in:
parent
dc630d01e3
commit
c4b72a88ef
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,6 @@
|
|||
import os
|
||||
import sys
|
||||
import functools
|
||||
import resource
|
||||
|
||||
STATUS = 0
|
||||
|
||||
|
|
@ -37,6 +36,7 @@ def only_on(platforms):
|
|||
|
||||
@only_on(('linux', 'darwin', 'freebsd', 'openbsd'))
|
||||
def check_rlimit_core():
|
||||
import resource
|
||||
soft, hard = resource.getrlimit(resource.RLIMIT_CORE)
|
||||
if soft > 0:
|
||||
error_unless_permitted('ALLOW_NONZERO_RLIMIT_CORE', """\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue