Control: tags -1 patch

Christoph Biedl wrote on Sat, Nov 03, 2018 at 16:13:58 +0100:
> -diffoscope-104/tests/data/test2.pcap: tcpdump capture file (little-endian) - 
> version 2.4 (Ethernet, capture length 262144)
> +diffoscope-104/tests/data/test2.pcap: pcap capture file, microsecond ts 
> (little-endian) - version 2.4 (Ethernet, capture length 262144)

Untested patch:

diff -ru diffoscope-104/diffoscope/comparators/pcap.py 
diffoscope-104.new/diffoscope/comparators/pcap.py
--- diffoscope-104/diffoscope/comparators/pcap.py       2018-10-15 
10:09:05.000000000 +0000
+++ diffoscope-104.new/diffoscope/comparators/pcap.py   2018-11-03 
17:04:03.749507655 +0000
@@ -40,7 +40,9 @@
 
 class PcapFile(File):
     DESCRIPTION = "tcpdump capture files (.pcap)"
-    FILE_TYPE_RE = re.compile(r'^tcpdump capture file\b')
+    # The regexp covers both libmagic<5.35 and libmagic>=5.35.
+    # See https://bugs.debian.org/912756
+    FILE_TYPE_RE = re.compile(r'^(tcpdump|pcap) capture file\b')
 
     def compare_details(self, other, source=None):
         return [Difference.from_command(

Cheers,

Daniel

Reply via email to