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 9D03F13888F for ; Wed, 7 Oct 2015 02:32:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3B10F21C00A; Wed, 7 Oct 2015 02:32:11 +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 288BEE086C for ; Wed, 7 Oct 2015 02:32:10 +0000 (UTC) Received: from professor-x (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id E916B3408EE for ; Wed, 7 Oct 2015 02:32:08 +0000 (UTC) Date: Tue, 6 Oct 2015 19:31:18 -0700 From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH] support: delete unused code Message-ID: <20151006193118.56226664.dolsen@gentoo.org> In-Reply-To: <1444167907-17673-1-git-send-email-vapier@gentoo.org> References: <1444167907-17673-1-git-send-email-vapier@gentoo.org> Organization: Gentoo 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 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 9ff049c2-925d-45e8-afc2-0dbd6ac482f1 X-Archives-Hash: 8f796934e6e631fa11556188612bfd26 On Tue, 6 Oct 2015 17:45:07 -0400 Mike Frysinger wrote: > Using the vulture tool (and verifying a bit with `git grep`), > delete various bits of code from this module that aren't used. > --- > catalyst/support.py | 28 ---------------------------- > 1 file changed, 28 deletions(-) > > diff --git a/catalyst/support.py b/catalyst/support.py > index f184ed7..62be63a 100644 > --- a/catalyst/support.py > +++ b/catalyst/support.py > @@ -1,7 +1,6 @@ > > import glob > import sys > -import string # pylint: disable=deprecated-module > import os > import types > import re > @@ -11,35 +10,8 @@ from subprocess import Popen > > from catalyst.defaults import verbosity, valid_config_file_values > > -selinux_capable = False > -#userpriv_capable = (os.getuid() == 0) > -#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(resource.RLIMIT_NOFILE)[DESIRED_RLIMIT] > -except Exception: > - # hokay, no resource module. > - max_fd_limit=256 > - Are you sure this is not needed? Because I recall having to fix the code because the API had changed, otherwise I couldn't get catalyst to run. But to be honest, catalyst is the only place I've seen this ever used. And so it is likely not needed. > -# pids this process knows of. > -spawned_pids = [] > - > - > -# a function to turn a string of non-printable characters > -# into a string of hex characters > -def hexify(s): > - hexStr = string.hexdigits > - r = '' > - for ch in s: > - i = ord(ch) > - r = r + hexStr[(i >> 4) & 0xF] + hexStr[i & 0xF] > - return r > - > > def read_from_clst(path): > line = '' -- Brian Dolbec