aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-08-05 00:48:33 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-08-05 00:48:33 +0000
commit35650ecfa356efc0d343d56ae178b076e882b632 (patch)
treeddbdb391691819607c20b7b69037a56b8d0b1ead /web
parentFix for bug #232234. (diff)
downloadpackages-35650ecfa356efc0d343d56ae178b076e882b632.tar.gz
packages-35650ecfa356efc0d343d56ae178b076e882b632.tar.bz2
packages-35650ecfa356efc0d343d56ae178b076e882b632.zip
Always validate the list index before using. There is probably a saner map/reduce version of that loop.
Diffstat (limited to 'web')
-rw-r--r--web/lib/changelog_formatter.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/lib/changelog_formatter.py b/web/lib/changelog_formatter.py
index 872cc98..dc02ce7 100644
--- a/web/lib/changelog_formatter.py
+++ b/web/lib/changelog_formatter.py
@@ -55,7 +55,10 @@ def _pretty_changelog_pass1(cat, pn, changelog):
changelog = changelog.strip()
changelog_lines = changelog.splitlines()
i = 0
- while changelog_lines is not None and changelog_lines[i].startswith('*'):
+ while changelog_lines is not None and \
+ len(changelog_lines) > i and \
+ changelog_lines[i] is not None and \
+ changelog_lines[i].startswith('*'):
i += 1
seen_files = False
seen_author = False