# HG changeset patch # User Rishabh Madan # Date 2017-08-12 03:51:42 # Node ID 589fda7895da3b906c74e27c7414f5d4a90b40f4 # Parent db6b666ce1e6c6fd26f6fb07c00fe0e3b18a081d releasenotes: minor bug fix for index error while serializing Differential Revision: https://phab.mercurial-scm.org/D356 diff --git a/hgext/releasenotes.py b/hgext/releasenotes.py --- a/hgext/releasenotes.py +++ b/hgext/releasenotes.py @@ -426,7 +426,7 @@ def serializenotes(sections, notes): lines.append('') - if lines[-1]: + if lines and lines[-1]: lines.append('') return '\n'.join(lines)