diff mbox series

[pushed] mklog: skip unsupported files

Message ID 421bbb9d-6714-35cd-177f-ee14ff76bfda@suse.cz
State New
Headers show
Series [pushed] mklog: skip unsupported files | expand

Commit Message

Martin Liška Jan. 14, 2021, 4:07 p.m. UTC
This fixes an infinite loop one could see for:
git show b87ec922c40 | ./contrib/mklog.py

contrib/ChangeLog:

	* mklog.py: Fix infinite loop for unsupported files.
---
  contrib/mklog.py | 3 +++
  1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/contrib/mklog.py b/contrib/mklog.py
index bf51e56337e..a70536a6849 100755
--- a/contrib/mklog.py
+++ b/contrib/mklog.py
@@ -133,6 +133,9 @@  def generate_changelog(data, no_functions=False, fill_pr_titles=False):
      diff = PatchSet(data)
  
      for file in diff:
+        # skip files that can't be parsed
+        if file.path == '/dev/null':
+            continue
          changelog = find_changelog(file.path)
          if changelog not in changelogs:
              changelogs[changelog] = []