ARPSCAN to plugin rewrite

This commit is contained in:
Jokob-sk
2023-08-07 08:23:39 +10:00
parent d848e18bc0
commit 9a13133a5f
18 changed files with 119 additions and 147 deletions

View File

@@ -9,7 +9,10 @@ from const import *
#-------------------------------------------------------------------------------
# duplication from helper to avoid circle
#-------------------------------------------------------------------------------
def timeNow():
def timeNowTZ():
if conf.tz:
return datetime.datetime.now(conf.tz).replace(microsecond=0)
else:
return datetime.datetime.now().replace(microsecond=0)
@@ -31,12 +34,12 @@ def mylog(requestedDebugLevel, n):
reqLvl = lvl[1]
if reqLvl <= setLvl:
file_print (*n)
file_print (*n)
#-------------------------------------------------------------------------------
def file_print (*args):
result = timeNow().strftime ('%H:%M:%S') + ' '
result = timeNowTZ().strftime ('%H:%M:%S') + ' '
for arg in args:
result += str(arg)