From 67c8cfe73eb665685f4bc82ba4297d0c48d81e93 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Sun, 2 Jun 2019 14:08:33 +0100 Subject: Store path to tar file in Tar object --- calm/pkg2html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'calm/pkg2html.py') diff --git a/calm/pkg2html.py b/calm/pkg2html.py index c12d811..9370092 100755 --- a/calm/pkg2html.py +++ b/calm/pkg2html.py @@ -333,8 +333,8 @@ def write_arch_listing(args, packages, arch): listings = os.listdir(dir) listings.remove('.htaccess') - for t in itertools.chain.from_iterable([packages[p].tars[vr] for vr in packages[p].tars]): - fver = re.sub(r'\.tar.*$', '', t) + for tn, to in itertools.chain.from_iterable([packages[p].tars[vr].items() for vr in packages[p].tars]): + fver = re.sub(r'\.tar.*$', '', tn) listing = os.path.join(dir, fver) # ... if it doesn't already exist, or force @@ -365,7 +365,7 @@ def write_arch_listing(args, packages, arch):

%s

''' % (header, header)), file=f)
 
-                        tf = os.path.join(args.rel_area, packages[p].path, t)
+                        tf = os.path.join(args.rel_area, to.path, to.fn)
                         if not os.path.exists(tf):
                             # this shouldn't happen with a full mirror
                             logging.error("tarfile %s not found" % (tf))
-- 
cgit v1.2.3