public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] [PATCH] support: delete unused code
Date: Tue,  6 Oct 2015 17:45:07 -0400	[thread overview]
Message-ID: <1444167907-17673-1-git-send-email-vapier@gentoo.org> (raw)

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
-
-# 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 = ''
-- 
2.5.2



             reply	other threads:[~2015-10-06 21:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 21:45 Mike Frysinger [this message]
2015-10-07  2:31 ` [gentoo-catalyst] [PATCH] support: delete unused code Brian Dolbec
2015-10-07  4:03   ` Mike Frysinger
2015-10-08 22:11 ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444167907-17673-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox