Permalink
Browse files

Fix mislogging unblocking as blocking

  • Loading branch information...
galeksandrp authored and Ruined1 committed Jun 6, 2017
1 parent 7ef17a5 commit fc46ab7499e7b49d7a35a700063d34aed4ac39bb
Showing with 2 additions and 2 deletions.
  1. +2 −2 dwt_util.py
@@ -84,9 +84,9 @@ def ip_block(ip_list, undo):

try:
subprocess_handler(shlex.split(cmd))
logger.info("IP Blocker: The IP {ip} was successfully blocked.".format(ip=ip))
logger.info("IP Blocker: The IP {ip} was successfully {act}.".format(ip=ip, act='unblocked' if undo else 'blocked'))
except CalledProcessError as e:
logger.exception("IP Blocker: Failed to block IP {ip}".format(ip=ip))
logger.exception("IP Blocker: Failed to {act} IP {ip}".format(act='unblock' if undo else 'block', ip=ip))
logger.critical("IP Blocker: Error output:\n" + e.stdout.decode('ascii', 'replace'))


0 comments on commit fc46ab7

Please sign in to comment.