formating and vscode problems

This commit is contained in:
2022-03-05 17:28:04 -05:00
parent be5858428c
commit cddf809759
6 changed files with 574 additions and 52 deletions
+5 -5
View File
@@ -1,6 +1,6 @@
"""
host and connection class shared between hbd and
the websit's heartbeat.py
host and connection class shared between hbd and
the websit's heartbeat.py
"""
@@ -234,7 +234,7 @@ class Host:
return self.dyn
def isIPv4(self, addr):
if type(addr) == type(()):
if isinstance(addr, tuple):
return addr[0].find(".") > 0
else:
return addr.find(".") > 0
@@ -328,7 +328,7 @@ class Host:
hostfields = Host.hostfields_long
h = []
for f in hostfields:
if type(f) == type(()):
if isinstance(f, tuple):
h.append(self.gene(tag, hd[f[0]], f[1]))
else:
h.append(self.gene(tag, hd[f]))
@@ -354,7 +354,7 @@ class Host:
res = []
le = max(40 - len(Host.hosts), 3)
res.append("<h4>Log of Events</h4>")
for m in msgs[len(msgs) - le :]:
for m in msgs[len(msgs) - le:]:
res.append("%s<BR>" % m)
return res