summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_html_packages.py
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-03-02 00:45:40 +0100
committerHolger Levsen <holger@layer-acht.org>2015-03-02 00:48:10 +0100
commit11c0c94d60e303f1d074fc622c32b3879784b90d (patch)
tree1664aa7adba7f6b61b32cde025b712c7882eec45 /bin/reproducible_html_packages.py
parent72be9ffd1fa930637027e4169d59ef90bffbbba6 (diff)
downloadjenkins.debian.net-11c0c94d60e303f1d074fc622c32b3879784b90d.tar.xz
reproducible: html_packages: catch a ENOENT in purge_old_pages()
Diffstat (limited to 'bin/reproducible_html_packages.py')
-rwxr-xr-xbin/reproducible_html_packages.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py
index 73b190aa..9b44cdaf 100755
--- a/bin/reproducible_html_packages.py
+++ b/bin/reproducible_html_packages.py
@@ -189,8 +189,12 @@ def purge_old_pages():
for suite in SUITES:
for arch in ARCHES:
log.info('Removing old pages from ' + suite + '...')
- presents = sorted(os.listdir(RB_PKG_PATH + '/' + suite + '/' +
- arch))
+ try:
+ presents = sorted(os.listdir(RB_PKG_PATH + '/' + suite + '/' +
+ arch))
+ except OSError as e:
+ if e.errno != errno.ENOENT: # that's 'No such file or
+ raise # directory' error (errno 17)
for page in presents:
pkg = page.rsplit('.', 1)[0]
query = 'SELECT s.name ' + \