# HG changeset patch # User Ian Moody <moz-ian@perix.co.uk> # Date 1568750767 -3600 # Tue Sep 17 21:06:07 2019 +0100 # Node ID 04c6de38734dc0534da29c0e05d9498214583b91 # Parent 6fb281f39c259927ac0a8c2d42ce81bc6ac1d7d4 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 diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -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