py3: byte-prefix sanitisation regexes in phabricator.py
authorIan Moody <moz-ian@perix.co.uk>
Tue, 17 Sep 2019 21:06:07 +0100
changeset 42951 04c6de38734d
parent 42950 6fb281f39c25
child 42952 44be33cf7a57
py3: byte-prefix sanitisation regexes in phabricator.py So it doesn't die with "TypeError: cannot use a string pattern on a bytes-like object". Differential Revision: https://phab.mercurial-scm.org/D6863
hgext/phabricator.py
--- a/hgext/phabricator.py	Wed Sep 18 00:20:43 2019 +0100
+++ b/hgext/phabricator.py	Tue Sep 17 21:06:07 2019 +0100
@@ -136,8 +136,8 @@
 
     def sanitiserequest(request):
         request.body = re.sub(
-            r'cli-[a-z0-9]+',
-            r'cli-hahayouwish',
+            br'cli-[a-z0-9]+',
+            br'cli-hahayouwish',
             request.body
         )
         return request