diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-01-10 02:37:54 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-01-11 00:39:20 +0000 |
commit | f892448331fe45f5883c4985341d17c969e7812c (patch) | |
tree | df2a418c40f53661da1e213934cd42e7be2d7994 | |
parent | 5308658941a56579d5e41af55ac993b6132c01d6 (diff) | |
download | jenkins.debian.net-f892448331fe45f5883c4985341d17c969e7812c.tar.xz |
reproducible: html_notes.py: split only one time in rsplit() + better log
-rwxr-xr-x | bin/reproducible_html_notes.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/reproducible_html_notes.py b/bin/reproducible_html_notes.py index cf488963..2a22b30b 100755 --- a/bin/reproducible_html_notes.py +++ b/bin/reproducible_html_notes.py @@ -244,10 +244,10 @@ def gen_html_issue(issue): def purge_old_notes(notes): - presents = os.listdir(NOTES_PATH) + presents = sorted(os.listdir(NOTES_PATH)) for page in presents: - pkg = page.rsplit('_')[0] - log.debug('checking if ' + page + ' (from ' + pkg + ') is still needed') + pkg = page.rsplit('_', 1)[0] + log.debug('Checking if ' + page + ' (from ' + pkg + ') is still needed') if pkg not in notes: log.info('There are no notes for ' + pkg + '. Removing old page.') os.remove(NOTES_PATH + '/' + page) @@ -284,7 +284,7 @@ def iterate_over_issues(issues): write_html_page(title=title, body=html, destfile=destfile) desturl = REPRODUCIBLE_URL + ISSUES_URI + '/' + issue + '_issue.html' - log.info("you can now see the issue at " +desturl) + log.info("you can now see the issue at " + desturl) i = i + 1 def index_issues(issues): |