D7187: py3: fix fsmonitor error message formatting under Python3

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Fri Nov 1 13:22:24 EDT 2019


This revision now requires changes to proceed.
indygreg added inline comments.
indygreg requested changes to this revision.

INLINE COMMENTS

> watchmanclient.py:26
>  
> -    def __str__(self):
> +    def __bytes__(self):
>          if self.warn:

There's no `__bytes__` on Python 2. So we'll want to preserve an implementation for Python 2.

This is typically something like `__str__ = encoding.strmethod(__bytes__)`

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7187/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7187

To: touilleMan, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list