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 374941393EA for ; Mon, 24 Mar 2014 16:08:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 57302E0B10; Mon, 24 Mar 2014 16:08:07 +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 50D91E0A9E for ; Mon, 24 Mar 2014 16:08:06 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8107C33FB23 for ; Mon, 24 Mar 2014 16:08:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 7F78A188F1 for ; Mon, 24 Mar 2014 16:08:02 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1395677228.12c985f89515f17d59107c35d8e9c76f3735f80a.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:2.X commit in: modules/ X-VCS-Repository: proj/catalyst X-VCS-Files: modules/catalyst_support.py X-VCS-Directories: modules/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 12c985f89515f17d59107c35d8e9c76f3735f80a X-VCS-Branch: 2.X Date: Mon, 24 Mar 2014 16:08:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8a429ff4-e962-4c0c-b223-77aeeff83556 X-Archives-Hash: 937a1f57dfa0ba875cf55850c6578844 commit: 12c985f89515f17d59107c35d8e9c76f3735f80a Author: Brian Dolbec gentoo org> AuthorDate: Mon Jan 14 03:32:29 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Mon Mar 24 16:07:08 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=12c985f8 Fix undefined variable: RLIMIT_NOFILE 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 = []