From 96f5a757abcd08b62b4d97a056fbe01c6e7b9158 Mon Sep 17 00:00:00 2001 From: Stephen Sun <5379172+stephenxs@users.noreply.github.com> Date: Sat, 8 Feb 2020 04:34:29 +0800 Subject: [PATCH] [daemon_base]fix error: syslog is not a member of DaemonBase (#4039) --- src/sonic-daemon-base/sonic_daemon_base/daemon_base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py b/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py index a0a5bff0a2..d3807bf915 100644 --- a/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py +++ b/src/sonic-daemon-base/sonic_daemon_base/daemon_base.py @@ -102,15 +102,15 @@ class DaemonBase(object): # Signal handler def signal_handler(self, sig, frame): if sig == signal.SIGHUP: - self.syslog.syslog(self.syslog.LOG_INFO, "Caught SIGHUP - ignoring...") + syslog.syslog(syslog.LOG_INFO, "Caught SIGHUP - ignoring...") elif sig == signal.SIGINT: - self.syslog.syslog(self.syslog.LOG_INFO, "Caught SIGINT - exiting...") + syslog.syslog(syslog.LOG_INFO, "Caught SIGINT - exiting...") sys.exit(128 + sig) elif sig == signal.SIGTERM: - self.syslog.syslog(self.syslog.LOG_INFO, "Caught SIGTERM - exiting...") + syslog.syslog(syslog.LOG_INFO, "Caught SIGTERM - exiting...") sys.exit(128 + sig) else: - self.syslog.syslog(self.syslog.LOG_WARNING, "Caught unhandled signal '" + sig + "'") + syslog.syslog(syslog.LOG_WARNING, "Caught unhandled signal '" + sig + "'") # Returns platform and hwsku def get_platform_and_hwsku(self):