diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-03-02 16:13:16 +0100 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-03-02 16:17:02 +0100 |
commit | 2a696b8256e77930a5283352a663012abe04c2e9 (patch) | |
tree | 3c4e4b8760f3d4df39af7b7649bd517b046d7b98 /bin | |
parent | 7724d61a28714a8650e44b9e4e0c7f072f2bbcf1 (diff) | |
download | jenkins.debian.net-2a696b8256e77930a5283352a663012abe04c2e9.tar.xz |
reproducible: html_packages: define variables in case of ENOENT. this avoids errors later
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_html_packages.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/reproducible_html_packages.py b/bin/reproducible_html_packages.py index eed35894..944ea857 100755 --- a/bin/reproducible_html_packages.py +++ b/bin/reproducible_html_packages.py @@ -188,13 +188,15 @@ def gen_all_rb_pkg_pages(suite='sid', arch='amd64', no_clean=False): def purge_old_pages(): for suite in SUITES: for arch in ARCHES: - log.info('Removing old pages from ' + suite + '...') + log.info('Removing old pages from ' + 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) + presents = [] + log.debug('page presents: ' + str(presents)) for page in presents: pkg = page.rsplit('.', 1)[0] query = 'SELECT s.name ' + \ |