1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2025-06-27 19:38:57 +02:00

fix: backwards compatibility for pre 3.10 python3

This commit is contained in:
aclist 2023-11-23 12:45:02 +09:00
parent 8b2900e303
commit 2c41f5a10d
3 changed files with 17 additions and 6 deletions
helpers

View file

@ -40,11 +40,16 @@ def get_rules(ip, qport):
except:
sys.exit(1)
def switch(case):
if case == "info":
get_info(ip, qport)
elif case == "rules":
get_rules(ip, qport)
else:
sys.exit(1)
ip = sys.argv[1]
qport = sys.argv[2]
mode = sys.argv[3]
match mode:
case "info":
get_info(ip, qport)
case "rules":
get_rules(ip, qport)
switch(mode)