From be26672b85f4c46185804584989e87a14ea06129 Mon Sep 17 00:00:00 2001 From: cronekorkn Date: Tue, 4 Jul 2023 23:00:29 +0200 Subject: [PATCH] obsolete import --- bundles/apt/items.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bundles/apt/items.py b/bundles/apt/items.py index c53e8cf..2032dd9 100644 --- a/bundles/apt/items.py +++ b/bundles/apt/items.py @@ -1,7 +1,6 @@ # TODO pin repo: https://superuser.com/a/1595920 from os.path import join -from urllib.parse import urlparse from glob import glob from os.path import join, basename @@ -59,7 +58,9 @@ for source_string in node.metadata.get('apt/sources'): # create sources lists and keyfiles for host, sources in hosts.items(): - keyfile = basename(glob(join(repo.path, 'data', 'apt', 'keys', f'{host}.*'))[0]) + paths = glob(join(repo.path, 'data', 'apt', 'keys', f'{host}.*')) + assert len(paths) == 1 + keyfile = basename(paths[0]) destination_path = f'/etc/apt/trusted.gpg.d/{keyfile}' for source in sources: