Merge "Remove argument "watch_log = ""

This commit is contained in:
Jenkins 2017-10-13 16:44:06 +00:00 committed by Gerrit Code Review
commit cddb705b81

@ -22,7 +22,6 @@ import pwd
import signal import signal
import sys import sys
from debtcollector import removals
from oslo_log import log as logging from oslo_log import log as logging
from neutron._i18n import _ from neutron._i18n import _
@ -168,12 +167,9 @@ class Daemon(object):
Usage: subclass the Daemon class and override the run() method Usage: subclass the Daemon class and override the run() method
""" """
@removals.removed_kwarg(
'watch_log',
message="Support for watch_log argument will be removed in Queens.")
def __init__(self, pidfile, stdin=DEVNULL, stdout=DEVNULL, def __init__(self, pidfile, stdin=DEVNULL, stdout=DEVNULL,
stderr=DEVNULL, procname='python', uuid=None, stderr=DEVNULL, procname='python', uuid=None,
user=None, group=None, watch_log=True): user=None, group=None):
"""Note: pidfile may be None.""" """Note: pidfile may be None."""
self.stdin = stdin self.stdin = stdin
self.stdout = stdout self.stdout = stdout
@ -183,7 +179,6 @@ class Daemon(object):
if pidfile is not None else None) if pidfile is not None else None)
self.user = user self.user = user
self.group = group self.group = group
self.watch_log = watch_log
def _fork(self): def _fork(self):
try: try:
@ -257,6 +252,5 @@ class Daemon(object):
start() will call this method after the process has daemonized. start() will call this method after the process has daemonized.
""" """
if not self.watch_log: unwatch_log()
unwatch_log()
drop_privileges(self.user, self.group) drop_privileges(self.user, self.group)