Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/10se1ucgo/DisableWinTracking.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Georgievskiy <galeksandrp@gmail.com>2017-06-06 10:30:18 +0300
committerRuined1 <ruined1@gmail.com>2018-01-24 05:09:01 +0300
commitfc46ab7499e7b49d7a35a700063d34aed4ac39bb (patch)
tree17d7dacef7dfb00718e38a4c09016b7fcb5e965e
parent7ef17a544a8d4a051ee1f27d6bf8c0fd5b21b27f (diff)
Fix mislogging unblocking as blocking
-rw-r--r--dwt_util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/dwt_util.py b/dwt_util.py
index 9ff098e..33f64f8 100644
--- a/dwt_util.py
+++ b/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'))