Gentoo Archives: gentoo-catalyst

From: Mike Frysinger <vapier@g.o>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] [PATCH] support: delete unused code
Date: Tue, 06 Oct 2015 21:45:15
Message-Id: 1444167907-17673-1-git-send-email-vapier@gentoo.org
1 Using the vulture tool (and verifying a bit with `git grep`),
2 delete various bits of code from this module that aren't used.
3 ---
4 catalyst/support.py | 28 ----------------------------
5 1 file changed, 28 deletions(-)
6
7 diff --git a/catalyst/support.py b/catalyst/support.py
8 index f184ed7..62be63a 100644
9 --- a/catalyst/support.py
10 +++ b/catalyst/support.py
11 @@ -1,7 +1,6 @@
12
13 import glob
14 import sys
15 -import string # pylint: disable=deprecated-module
16 import os
17 import types
18 import re
19 @@ -11,35 +10,8 @@ from subprocess import Popen
20
21 from catalyst.defaults import verbosity, valid_config_file_values
22
23 -selinux_capable = False
24 -#userpriv_capable = (os.getuid() == 0)
25 -#fakeroot_capable = False
26 -
27 BASH_BINARY = "/bin/bash"
28
29 -# set it to 0 for the soft limit, 1 for the hard limit
30 -DESIRED_RLIMIT = 0
31 -try:
32 - import resource
33 - max_fd_limit=resource.getrlimit(resource.RLIMIT_NOFILE)[DESIRED_RLIMIT]
34 -except Exception:
35 - # hokay, no resource module.
36 - max_fd_limit=256
37 -
38 -# pids this process knows of.
39 -spawned_pids = []
40 -
41 -
42 -# a function to turn a string of non-printable characters
43 -# into a string of hex characters
44 -def hexify(s):
45 - hexStr = string.hexdigits
46 - r = ''
47 - for ch in s:
48 - i = ord(ch)
49 - r = r + hexStr[(i >> 4) & 0xF] + hexStr[i & 0xF]
50 - return r
51 -
52
53 def read_from_clst(path):
54 line = ''
55 --
56 2.5.2

Replies