Skip to content

Commit

Permalink
fix log colors on loss of ext.ip
Browse files Browse the repository at this point in the history
  • Loading branch information
9001 committed Dec 19, 2024
1 parent 946a8c5 commit 552897a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions copyparty/tcpsrv.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,12 @@ def netmon(self):
rem = []
for k, v in netdevs.items():
if k not in self.netdevs:
add.append("\n added %s = %s" % (k, v))
add.append("\n\033[32m added %s = %s" % (k, v))
for k, v in self.netdevs.items():
if k not in netdevs:
rem.append("\nremoved %s = %s" % (k, v))
rem.append("\n\033[33mremoved %s = %s" % (k, v))

t = "network change detected:\033[32m%s\033[33m%s"
t = "network change detected:%s%s"
self.log("tcpsrv", t % ("".join(add), "".join(rem)), 3)
self.netdevs = netdevs
self._distribute_netdevs()
Expand Down

0 comments on commit 552897a

Please sign in to comment.