aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_commit.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc-changelog/git_commit.py')
-rwxr-xr-xcontrib/gcc-changelog/git_commit.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py
index aae3416..d90e6c1 100755
--- a/contrib/gcc-changelog/git_commit.py
+++ b/contrib/gcc-changelog/git_commit.py
@@ -718,11 +718,12 @@ class GitCommit:
if not prs:
# if all ChangeLog entries have identical PRs
# then use them
- prs = self.changelog_entries[0].prs
- for entry in self.changelog_entries:
- if entry.prs != prs:
- prs = []
- break
+ if self.changelog_entries:
+ prs = self.changelog_entries[0].prs
+ for entry in self.changelog_entries:
+ if entry.prs != prs:
+ prs = []
+ break
entry = ChangeLogEntry(changelog_location,
self.top_level_authors,
prs)