mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
fix for braces in python3
This commit is contained in:
parent
7855438ca8
commit
68886b6777
1 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ def is_after204_timeout(ip):
|
||||||
ts=tstamp(datetime.datetime.now(tzutc()))
|
ts=tstamp(datetime.datetime.now(tzutc()))
|
||||||
current_ts, last_ts, send204after = timeout_info(ip)
|
current_ts, last_ts, send204after = timeout_info(ip)
|
||||||
if send204after == 0: return False
|
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:
|
if not send204after:
|
||||||
return False
|
return False
|
||||||
if ts - int(send204after) > 0:
|
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()) ]
|
data = ['{}: {}\n'.format(key, value) for key, value in sorted(environ.items()) ]
|
||||||
#logger.debug("need the correct ip:{}".format(data))
|
#logger.debug("need the correct ip:{}".format(data))
|
||||||
ip = environ['REMOTE_ADDR'].strip()
|
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)
|
mac = subprocess.check_output(cmd, shell=True)
|
||||||
data = []
|
data = []
|
||||||
data.append("host: {}\n".format(environ['HTTP_HOST']))
|
data.append("host: {}\n".format(environ['HTTP_HOST']))
|
||||||
|
|
Loading…
Reference in a new issue