diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2020-02-09 19:07:30 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2020-02-09 19:07:30 +0300 |
commit | 2561af30026554830521662513db8e0a113a22f1 (patch) | |
tree | e427cd3e9d35694f7ca34f285ff86017d1f8ded8 | |
parent | 17775b37f6af508335f0ce74758da0263c1e05f8 (diff) |
Fix dryrun in listings
-rwxr-xr-x | calm/pkg2html.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/calm/pkg2html.py b/calm/pkg2html.py index 21256ae..110f03a 100755 --- a/calm/pkg2html.py +++ b/calm/pkg2html.py @@ -434,8 +434,11 @@ def write_arch_listing(args, packages, arch): # # for each tarfile, write tarfile listing # - listings = os.listdir(dir) - listings.remove('.htaccess') + if os.path.exists(dir): + listings = os.listdir(dir) + listings.remove('.htaccess') + else: + listings = [] 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) |