lf_cleanup.py : pep8 cleanup

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-12-14 05:05:53 -07:00
parent 78bffdbbf0
commit de3683f220

View File

@@ -177,19 +177,20 @@ class lf_clean(Realm):
self.sta_done = True
return still_looking_sta
'''
1: delete cx
2: delete endp
3: delete sta
when deleting sta first, you will end up with phantom CX
'''
def cleanup(self):
if self.clean_cxs:
# also clean the endp when cleaning cxs
still_looking_cxs = self.cxs_clean()
still_looking_endp = self.endp_clean()
print("clean_cxs: still_looking_cxs {looking_cxs} still_looking_endp {looking_endp}".format(looking_cxs=still_looking_cxs,looking_endp=still_looking_endp))
print("clean_cxs: still_looking_cxs {looking_cxs} still_looking_endp {looking_endp}".format(
looking_cxs=still_looking_cxs, looking_endp=still_looking_endp))
if self.clean_endp and not self.clean_cxs:
still_looking_endp = self.endp_clean()
print("clean_endp: still_looking_endp {looking_endp}".format(looking_endp=still_looking_endp))
@@ -198,6 +199,7 @@ class lf_clean(Realm):
still_looking_sta = self.sta_clean()
print("clean_sta: still_looking_sta {looking_sta}".format(looking_sta=still_looking_sta))
def main():
parser = argparse.ArgumentParser(
@@ -255,5 +257,6 @@ python3 ./lf_clean.py --mgr MGR
else:
print("please add option of --cxs ,--endp, or --sta to clean")
if __name__ == "__main__":
main()