forked from hazelcast/client-compatibility-suites
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset_which_client_run.py
52 lines (46 loc) · 1.03 KB
/
set_which_client_run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import argparse
import json
def parse_arg() -> argparse.Namespace:
parser = argparse.ArgumentParser(
description="Returns the array of which client is set to run"
)
parser.add_argument(
"--csharp",
dest="csharp",
type=str,
)
parser.add_argument(
"--go",
dest="go",
type=str,
)
parser.add_argument(
"--nodejs",
dest="nodejs",
type=str,
)
parser.add_argument(
"--python",
dest="python",
type=str,
)
parser.add_argument(
"--cpp",
dest="cpp",
type=str,
)
return parser.parse_args()
if __name__ == "__main__":
args = parse_arg()
options = []
if args.csharp != "no":
options.append("csharp")
if args.go != "no":
options.append("go")
if args.nodejs != "no":
options.append("nodejs")
if args.python != "no":
options.append("python")
if args.cpp != "no":
options.append("cpp")
print(json.dumps(options))