Skip to content

Commit

Permalink
Merge pull request #66 from z3ntu/master
Browse files Browse the repository at this point in the history
Fix deprecation warnings for logger.warn()
  • Loading branch information
thesharp committed Mar 23, 2018
2 parents f23588d + fb19cae commit beb0e53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions daemonize.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ def sigterm(self, signum, frame):
"""
These actions will be done after SIGTERM.
"""
self.logger.warn("Caught signal %s. Stopping daemon." % signum)
self.logger.warning("Caught signal %s. Stopping daemon." % signum)
sys.exit(0)

def exit(self):
"""
Cleanup pid file at exit.
"""
self.logger.warn("Stopping daemon.")
self.logger.warning("Stopping daemon.")
os.remove(self.pid)
sys.exit(0)

Expand Down Expand Up @@ -239,7 +239,7 @@ def start(self):
signal.signal(signal.SIGTERM, self.sigterm)
atexit.register(self.exit)

self.logger.warn("Starting daemon.")
self.logger.warning("Starting daemon.")

try:
self.action(*privileged_action_result)
Expand Down

0 comments on commit beb0e53

Please sign in to comment.