]> git.proxmox.com Git - mirror_linux-firmware.git/commitdiff
Merge branch 'mlimonci/use-am' into 'main'
authorJosh Boyer <jwboyer@redhat.com>
Tue, 24 Oct 2023 11:20:25 +0000 (11:20 +0000)
committerJosh Boyer <jwboyer@redhat.com>
Tue, 24 Oct 2023 11:20:25 +0000 (11:20 +0000)
Use `git am` instead of `b4 shazam`

See merge request kernel-firmware/linux-firmware!40

1  2 
contrib/process_linux_firmware.py

index ab005ee7cc774a35aeac479aec71a2979738108b,ab5de8ed8339218db02a3a53804436e7afe56e04..663f4ca7b982bfbe977b9cf50934499b1055f031
@@@ -44,15 -44,11 +44,15 @@@ def classify_content(content)
  
      for part in msg.walk():
          if part.get_content_type() == "text/plain":
 -            body = part.get_payload(decode=True).decode("utf-8")
 -            for key in content_types.keys():
 -                if key in body:
 -                    return content_types[key]
 -            break
 +            try:
 +                body = part.get_payload(decode=True).decode("utf-8")
 +                for key in content_types.keys():
 +                    if key in body:
 +                        return content_types[key]
 +                break
 +            except UnicodeDecodeError as e:
 +                logging.warning("Failed to decode email: %s, treating as SPAM" % e)
 +                break
      return ContentType.SPAM
  
  
@@@ -172,7 -168,7 +172,7 @@@ def process_patch(mbox, num, remote)
      quiet_cmd(cmd)
  
      # apply the patch
-     cmd = ["b4", "shazam", "-m", "-"]
+     cmd = ["git", "am"]
      logging.debug("Running {}".format(cmd))
      p = subprocess.Popen(
          cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE