1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

fix for braces in python3

This commit is contained in:
George Hunt 2019-12-06 01:09:28 +00:00
parent 9127dfeae6
commit f3a89713b9

View file

@ -123,7 +123,7 @@ def is_after204_timeout(ip):
ts=tstamp(datetime.datetime.now(tzutc()))
current_ts, last_ts, send204after = timeout_info(ip)
if send204after == 0: return False
logger.debug("function: is_after204_timeout send204after:{} current: {}".format((send204after,ts,)))
logger.debug("function: is_after204_timeout send204after:{} current: {}".format(send204after,ts,))
if not send204after:
return False
if ts - int(send204after) > 0:
@ -390,7 +390,7 @@ def application (environ, start_response):
data = ['{}: {}\n'.format(key, value) for key, value in sorted(environ.items()) ]
#logger.debug("need the correct ip:{}".format(data))
ip = environ['REMOTE_ADDR'].strip()
cmd="arp -an {}|gawk \'{print $4}\'".format(ip)
cmd="arp -an {}|gawk \'{{print $4}}\'".format(ip)
mac = subprocess.check_output(cmd, shell=True)
data = []
data.append("host: {}\n".format(environ['HTTP_HOST']))