-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommitPackages.py
More file actions
48 lines (38 loc) · 1.01 KB
/
commitPackages.py
File metadata and controls
48 lines (38 loc) · 1.01 KB
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
from utils import files, packages, utils
def load_inputs(
env=None,
orgId=None,
fileName=None,
pids=None,
):
if env is None:
env = utils.select_env()
if orgId is None:
orgId = utils.select_org(env)
if fileName is None:
# The file name must be to the requester's hub name (e.g. 8506)
if utils.select_answer(">> Do you have a file with the package keys?") == "Y":
fileName = (
input(">> Type the file name: ")
.strip()
.replace(".txt", "")
.replace("./", "")
.replace(".\\", "")
)
# if user wants to read packages from a file, get them now
pids = files.get_data_from_file(fileName)
if pids is None:
pids = packages.get_list_of_keys("pi")
main(
env,
orgId,
pids,
)
def main(
env,
orgId,
keys,
):
packages.commit_packages(env, orgId, keys)
if __name__ == "__main__":
load_inputs()