From f892448331fe45f5883c4985341d17c969e7812c Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Sat, 10 Jan 2015 02:37:54 +0100 Subject: reproducible: html_notes.py: split only one time in rsplit() + better log --- bin/reproducible_html_notes.py | 8 ++++---- 1 file 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): -- cgit v1.2.3-70-g09d2