Skip to content

Commit

Permalink
[daemon_base]fix error: syslog is not a member of DaemonBase (sonic-n…
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenxs authored and pphuchar committed Mar 9, 2020
1 parent 377da3b commit ff11795
Showing 1 changed file with 4 additions and 4 deletions.
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

0 comments on commit ff11795

Please sign in to comment.