Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sonic_daemon_base]Fix error: DaemonBase: object has no attribute 'syslog' #4034 #4039

Merged
merged 1 commit into from
Feb 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sonic-daemon-base/sonic_daemon_base/daemon_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,15 @@ def __init__(self):
# 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):
Expand Down