mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-05 13:17:53 +00:00
asus_ap: Fix whitespace
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
|
|
||||||
'''
|
"""
|
||||||
NAME:
|
NAME:
|
||||||
asus_ap.py
|
asus_ap.py
|
||||||
|
|
||||||
@@ -19,9 +19,10 @@ NOTES:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
'''
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info[0] != 3:
|
if sys.version_info[0] != 3:
|
||||||
print("This script requires Python3")
|
print("This script requires Python3")
|
||||||
exit()
|
exit()
|
||||||
@@ -36,16 +37,18 @@ from pexpect_serial import SerialSpawn
|
|||||||
class FileAdapter(object):
|
class FileAdapter(object):
|
||||||
def __init__(self, logger):
|
def __init__(self, logger):
|
||||||
self.logger = logger
|
self.logger = logger
|
||||||
|
|
||||||
def write(self, data):
|
def write(self, data):
|
||||||
# NOTE: data can be a partial line, multiple lines
|
# NOTE: data can be a partial line, multiple lines
|
||||||
data = data.strip() # ignore leading/trailing whitespace
|
data = data.strip() # ignore leading/trailing whitespace
|
||||||
if data: # non-blank
|
if data: # non-blank
|
||||||
self.logger.info(data)
|
self.logger.info(data)
|
||||||
|
|
||||||
def flush(self):
|
def flush(self):
|
||||||
pass # leave it to logging to flush properly
|
pass # leave it to logging to flush properly
|
||||||
|
|
||||||
|
|
||||||
class lf_ap():
|
class lf_ap:
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
_ap_test_mode=False,
|
_ap_test_mode=False,
|
||||||
_ap_2G_interface="wl0",
|
_ap_2G_interface="wl0",
|
||||||
@@ -84,7 +87,7 @@ class lf_ap():
|
|||||||
ap_results = "exception on accessing {} Command: {}\r\n".format(self.ap_port, self.ap_cmd)
|
ap_results = "exception on accessing {} Command: {}\r\n".format(self.ap_port, self.ap_cmd)
|
||||||
print("{}".format(ap_results))
|
print("{}".format(ap_results))
|
||||||
|
|
||||||
if(self.ap_file != None):
|
if self.ap_file is not None:
|
||||||
ap_file = open(str(self.ap_file), "a")
|
ap_file = open(str(self.ap_file), "a")
|
||||||
ap_file.write(ap_results)
|
ap_file.write(ap_results)
|
||||||
ap_file.close()
|
ap_file.close()
|
||||||
@@ -112,19 +115,19 @@ class lf_ap():
|
|||||||
def ap_dl_stats(self, band):
|
def ap_dl_stats(self, band):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def ap_store_dl_scheduler_stats(self,band):
|
@staticmethod
|
||||||
|
def ap_store_dl_scheduler_stats(band):
|
||||||
if band is "6G":
|
if band is "6G":
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def ap_store_ul_scheduler_stats(self, band):
|
def ap_store_ul_scheduler_stats(self, band):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def ap_ofdma_stats(self, band):
|
def ap_ofdma_stats(self, band):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def main():
|
|
||||||
|
|
||||||
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog='lf_ap.py',
|
prog='lf_ap.py',
|
||||||
# formatter_class=argparse.RawDescriptionHelpFormatter,
|
# formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
@@ -173,7 +176,6 @@ Generic command layout:
|
|||||||
|
|
||||||
ap_dut.ap_action()
|
ap_dut.ap_action()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user