mirror of
https://github.com/aclist/dztui.git
synced 2026-10-29 06:02:51 +01:00
fix: backwards compatibility for pre 3.10 python3
This commit is contained in:
1 parent
8b2900e303
commit
2c41f5a10d
3 files changed
+17
-6
No files matched your search
+10
-5
@@ -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)
|
||||
Reference in new issue
Block a user