mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-04 02:04:06 +00:00
fix(ulimit): import library only in windows (#3738)
This commit is contained in:
@@ -7,7 +7,6 @@ import shutil
|
|||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from pkgutil import walk_packages
|
from pkgutil import walk_packages
|
||||||
from resource import setrlimit
|
|
||||||
from types import ModuleType
|
from types import ModuleType
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
@@ -529,7 +528,7 @@ def execute_checks(
|
|||||||
|
|
||||||
if os.name != "nt":
|
if os.name != "nt":
|
||||||
try:
|
try:
|
||||||
from resource import RLIMIT_NOFILE, getrlimit
|
from resource import RLIMIT_NOFILE, getrlimit, setrlimit
|
||||||
|
|
||||||
# Check ulimit for the maximum system open files
|
# Check ulimit for the maximum system open files
|
||||||
soft, hard = getrlimit(RLIMIT_NOFILE)
|
soft, hard = getrlimit(RLIMIT_NOFILE)
|
||||||
|
|||||||
Reference in New Issue
Block a user