This patch fixes the following pylint error:
W0212:257:StartDaemon: Access to a protected member _exit of a client
class

Additionally, it renames the _RunCmdDaemonChild function to
_StartDaemonChild. _RunCmdDaemonChild was a leftover from a previous
version of this code.

Signed-off-by: Michael Hanselmann <[email protected]>
---
 lib/utils.py |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/lib/utils.py b/lib/utils.py
index de11e24..d3ddac7 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -248,13 +248,13 @@ def StartDaemon(cmd, env=None, cwd="/", output=None, 
output_fd=None,
           if pid == 0:
             try:
               # Child process, won't return
-              _RunCmdDaemonChild(errpipe_read, errpipe_write,
-                                 pidpipe_read, pidpipe_write,
-                                 cmd, cmd_env, cwd,
-                                 output, output_fd, pidfile)
+              _StartDaemonChild(errpipe_read, errpipe_write,
+                                pidpipe_read, pidpipe_write,
+                                cmd, cmd_env, cwd,
+                                output, output_fd, pidfile)
             finally:
               # Well, maybe child process failed
-              os._exit(1)
+              os._exit(1) # pylint: disable-msg=W0212
         finally:
           _CloseFDNoErr(errpipe_write)
 
@@ -288,10 +288,10 @@ def StartDaemon(cmd, env=None, cwd="/", output=None, 
output_fd=None,
                              (pidtext, err))
 
 
-def _RunCmdDaemonChild(errpipe_read, errpipe_write,
-                       pidpipe_read, pidpipe_write,
-                       args, env, cwd,
-                       output, fd_output, pidfile):
+def _StartDaemonChild(errpipe_read, errpipe_write,
+                      pidpipe_read, pidpipe_write,
+                      args, env, cwd,
+                      output, fd_output, pidfile):
   """Child process for starting daemon.
 
   """
-- 
1.6.6

Reply via email to