aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-26 10:10:28 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-26 10:10:28 -0600
commit94c26b230b231c967be958789cdaa16211da4b10 (patch)
tree824b25a3ec22a2ed2761e66af8ec51d984dcf82f
parent4d4028a1bc27834cff094fcd8301ad079438a728 (diff)
downloadnoRMS-94c26b230b231c967be958789cdaa16211da4b10.tar.gz
noRMS-94c26b230b231c967be958789cdaa16211da4b10.zip
ask for all the info at once
-rw-r--r--noRMS-apk.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/noRMS-apk.py b/noRMS-apk.py
index 425b225..a3039c3 100644
--- a/noRMS-apk.py
+++ b/noRMS-apk.py
@@ -56,9 +56,11 @@ for package in all_packages.splitlines():
rms_count = 0
-for origin in origins:
- info_webpage = subprocess.check_output(['apk', 'info', '-w', origin], text=True)
- webpage = info_webpage.splitlines()[1]
+origin_keys = list(origins.keys())
+info_output = subprocess.check_output(['apk', 'info', '-w', *origin_keys], text=True)
+info_pieces = info_output.split('\n\n')
+for origin, info in zip(origin_keys, info_pieces):
+ webpage = info.splitlines()[1]
parsed_url = urllib.parse.urlparse(webpage)
host = parsed_url.netloc
if verbose >= 1: