File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 3434
3535resp_json = response .json ()
3636
37- page = resp_json ["data" ]["package" ]["variants" ]["page" ]
38-
3937results = []
4038
41- for pkg in page :
42- # if python version is specified, filter only package files
43- # that contains the python version substring (e.g. py310)
44- if args .python :
45- if py_str in pkg ["filename" ]:
39+ if resp_json ["data" ]["package" ]:
40+ page = resp_json ["data" ]["package" ]["variants" ]["page" ]
41+
42+
43+ for pkg in page :
44+ # if python version is specified, filter only package files
45+ # that contains the python version substring (e.g. py310)
46+ if args .python :
47+ if py_str in pkg ["filename" ]:
48+ results .append (pkg ["filename" ])
49+ else :
4650 results .append (pkg ["filename" ])
47- else :
48- results .append (pkg ["filename" ])
4951
5052print (json .dumps (results ))
You can’t perform that action at this time.
0 commit comments