[diffoscope] 01/01: fix binary regex, br"" is allowed in python2

Ximin Luo infinity0 at debian.org
Thu Jun 1 19:40:00 CEST 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch WIP/py2-pypy
in repository diffoscope.

commit f925049dd3266e26b4b8aa2300d7e08ad1d7b2f1
Author: Ximin Luo <infinity0 at debian.org>
Date:   Thu Jun 1 19:39:21 2017 +0200

    fix binary regex, br"" is allowed in python2
---
 diffoscope/comparators/elf.py     | 2 +-
 diffoscope/comparators/gettext.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/diffoscope/comparators/elf.py b/diffoscope/comparators/elf.py
index a74e14c..c9717b0 100644
--- a/diffoscope/comparators/elf.py
+++ b/diffoscope/comparators/elf.py
@@ -224,7 +224,7 @@ class ObjdumpSection(Command):
         return line
 
 class ObjdumpDisassembleSection(ObjdumpSection):
-    RE_SYMBOL_COMMENT = re.compile(r'^( +[0-9a-f]+:[^#]+)# [0-9a-f]+ <[^>]+>$')
+    RE_SYMBOL_COMMENT = re.compile(br'^( +[0-9a-f]+:[^#]+)# [0-9a-f]+ <[^>]+>$')
 
     def objdump_options(self):
         # With '--line-numbers' we get the source filename and line within the
diff --git a/diffoscope/comparators/gettext.py b/diffoscope/comparators/gettext.py
index 3bb7610..a2afd3f 100644
--- a/diffoscope/comparators/gettext.py
+++ b/diffoscope/comparators/gettext.py
@@ -31,7 +31,7 @@ logger = logging.getLogger(__name__)
 
 
 class Msgunfmt(Command):
-    CHARSET_RE = re.compile(r'^"Content-Type: [^;]+; charset=([^\\]+)\\n"$')
+    CHARSET_RE = re.compile(br'^"Content-Type: [^;]+; charset=([^\\]+)\\n"$')
 
     def __init__(self, *args, **kwargs):
         super(Msgunfmt, self).__init__(*args, **kwargs)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git


More information about the diffoscope mailing list