diff options
author | Martin Liska <mliska@suse.cz> | 2022-12-14 11:33:25 +0100 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-12-14 11:33:25 +0100 |
commit | e165214777acfe5621ad36e55b16e098d50e1596 (patch) | |
tree | 51c69d574ca7174e6c9a95501c0d78a591d33228 | |
parent | 693638252aae9b36b5b928d7195df6d28bf409d7 (diff) | |
download | gcc-e165214777acfe5621ad36e55b16e098d50e1596.zip gcc-e165214777acfe5621ad36e55b16e098d50e1596.tar.gz gcc-e165214777acfe5621ad36e55b16e098d50e1596.tar.bz2 |
mklog: do not depend on recent unidiff version
contrib/ChangeLog:
* mklog.py: Check for number of hunks and not if a modified
file is binary.
-rwxr-xr-x | contrib/mklog.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/mklog.py b/contrib/mklog.py index 358b7fc..5dea8a0 100755 --- a/contrib/mklog.py +++ b/contrib/mklog.py @@ -186,8 +186,9 @@ def generate_changelog(data, no_functions=False, fill_pr_titles=False, # contains commented code which a note that it # has not been tested due to a certain PR or DR. this_file_prs = [] - if not file.is_binary_file: - for line in list(file)[0][0:10]: + hunks = list(file) + if hunks: + for line in hunks[0][0:10]: m = pr_regex.search(line.value) if m: pr = m.group('pr') |