diff --git a/lib/gpi/sysspecs.py b/lib/gpi/sysspecs.py index 1e4503d..9db9a21 100644 --- a/lib/gpi/sysspecs.py +++ b/lib/gpi/sysspecs.py @@ -102,15 +102,14 @@ def findAndSetMaxOpenFilesLimit(self): import resource lim = resource.getrlimit(resource.RLIMIT_NOFILE)[0] hard_lim = resource.getrlimit(resource.RLIMIT_NOFILE)[1] + # if the hard limit is infinite (unlimited resources) cap it at 10000 + if hard_lim == resource.RLIM_INFINITY: + lim = 10000 + hard_lim = 10000 else: lim = 10000 hard_lim = 10000 - # if the hard limit is infinite (unlimited resources) cap it at 10000 - if hard_lim == resource.RLIM_INFINITY: - lim = 10000 - hard_lim = 10000 - while (not self._inWindows) and (not maxFound): try: lim += 10