1 |
On 06 Oct 2015 19:31, Brian Dolbec wrote: |
2 |
> On Tue, 6 Oct 2015 17:45:07 -0400 Mike Frysinger wrote: |
3 |
> > Using the vulture tool (and verifying a bit with `git grep`), |
4 |
> > delete various bits of code from this module that aren't used. |
5 |
> > --- |
6 |
> > catalyst/support.py | 28 ---------------------------- |
7 |
> > 1 file changed, 28 deletions(-) |
8 |
> > |
9 |
> > diff --git a/catalyst/support.py b/catalyst/support.py |
10 |
> > index f184ed7..62be63a 100644 |
11 |
> > --- a/catalyst/support.py |
12 |
> > +++ b/catalyst/support.py |
13 |
> > @@ -1,7 +1,6 @@ |
14 |
> > |
15 |
> > import glob |
16 |
> > import sys |
17 |
> > -import string # pylint: disable=deprecated-module |
18 |
> > import os |
19 |
> > import types |
20 |
> > import re |
21 |
> > @@ -11,35 +10,8 @@ from subprocess import Popen |
22 |
> > |
23 |
> > from catalyst.defaults import verbosity, valid_config_file_values |
24 |
> > |
25 |
> > -selinux_capable = False |
26 |
> > -#userpriv_capable = (os.getuid() == 0) |
27 |
> > -#fakeroot_capable = False |
28 |
> > - |
29 |
> > BASH_BINARY = "/bin/bash" |
30 |
> > |
31 |
> > -# set it to 0 for the soft limit, 1 for the hard limit |
32 |
> > -DESIRED_RLIMIT = 0 |
33 |
> > -try: |
34 |
> > - import resource |
35 |
> > - |
36 |
> > max_fd_limit=resource.getrlimit(resource.RLIMIT_NOFILE)[DESIRED_RLIMIT] |
37 |
> > -except Exception: |
38 |
> > - # hokay, no resource module. |
39 |
> > - max_fd_limit=256 |
40 |
> |
41 |
> Are you sure this is not needed? Because I recall having to fix the |
42 |
> code because the API had changed, otherwise I couldn't get catalyst to |
43 |
> run. But to be honest, catalyst is the only place I've seen this ever |
44 |
> used. And so it is likely not needed. |
45 |
|
46 |
as long as we can assume that nothing is importing catalyst, |
47 |
i can't see code that uses these things |
48 |
|
49 |
picking max_fd_limit randomly, it was used until this commit: |
50 |
36610754ba2daca723064021001c5128d83e8f21 |
51 |
where things were gutted significantly. |
52 |
|
53 |
same goes for selinux_capable |
54 |
-mike |