mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +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()))
|
||||
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']))
|
||||
|
|
Loading…
Reference in a new issue