From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id AA5FD1391DB for ; Sat, 22 Mar 2014 17:04:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01CDAE0CC6; Sat, 22 Mar 2014 17:03:52 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9A13EE0CC6 for ; Sat, 22 Mar 2014 17:03:51 +0000 (UTC) Received: from big_daddy.dol-sen.ca (S010600222de111ff.vc.shawcable.net [96.49.5.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 87A2333FD13 for ; Sat, 22 Mar 2014 17:03:50 +0000 (UTC) From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: [gentoo-catalyst] [PATCH 16/17] Fix undefined variable: RLIMIT_NOFILE Date: Sat, 22 Mar 2014 10:03:14 -0700 Message-Id: <1395507795-13754-17-git-send-email-dolsen@gentoo.org> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1395507795-13754-1-git-send-email-dolsen@gentoo.org> References: <1395507795-13754-1-git-send-email-dolsen@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Archives-Salt: c4a8adb2-daf6-45e0-81f1-e9b1533cea45 X-Archives-Hash: e9eb2bd4613178e31fa041ece17af942 It was not imported from resource, it was also not used correctly. --- modules/catalyst_support.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 316dfa3..d493f88 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -6,14 +6,16 @@ selinux_capable = False #fakeroot_capable = False BASH_BINARY = "/bin/bash" +# set it to 0 for the soft limit, 1 for the hard limit +DESIRED_RLIMIT = 0 try: - import resource - max_fd_limit=resource.getrlimit(RLIMIT_NOFILE) + import resource + max_fd_limit=resource.getrlimit(resource.RLIMIT_NOFILE)[DESIRED_RLIMIT] except SystemExit, e: - raise + raise except: - # hokay, no resource module. - max_fd_limit=256 + # hokay, no resource module. + max_fd_limit=256 # pids this process knows of. spawned_pids = [] -- 1.8.5.3