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