aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-06-23 22:55:21 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2008-06-23 22:55:21 -0700
commit1215f0781c18221fe4ce67b385c4d4523f25b152 (patch)
tree422e3eb3d40a552c56b2fb44a7f4af3adce85f99 /web
parentMerge branch 'master' of git+ssh://robbat2@git.gentoo.org/var/gitroot/packages (diff)
downloadpackages-1215f0781c18221fe4ce67b385c4d4523f25b152.tar.gz
packages-1215f0781c18221fe4ce67b385c4d4523f25b152.tar.bz2
packages-1215f0781c18221fe4ce67b385c4d4523f25b152.zip
Handle empty changelog requiets.
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 09c2f12..9a4ab70 100644
--- a/web/lib/changelog_formatter.py
+++ b/web/lib/changelog_formatter.py
@@ -52,7 +52,7 @@ def _pretty_changelog_pass1(cat, pn, changelog):
changelog = changelog.strip()
changelog_lines = changelog.splitlines()
i = 0
- while changelog_lines[i].startswith('*'):
+ while changelog_lines is not None and changelog_lines[i].startswith('*'):
i += 1
seen_files = False
seen_author = False
@@ -91,6 +91,9 @@ def _pretty_changelog_pass1(cat, pn, changelog):
seen_files = True
i += 1
changelog = "\n".join(changelog_lines)
+ changelog.strip()
+ if len(changelog) == 0:
+ changelog = "No changelog entry available"
return (changelog, authorname, authorid)
def _pretty_changelog_pass2(changelog):