HomePhabricator

wireprotoserver: convert ErrorResponse to bytes

Authored by mharbison72.

Description

wireprotoserver: convert ErrorResponse to bytes

Caught by pytype:

File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 236, in handlewsgirequest: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types]
         Expected: (self, ints: Iterable[int])
  Actually passed: (self, ints: mercurial.hgweb.common.ErrorResponse)
  The following methods aren't implemented on mercurial.hgweb.common.ErrorResponse:
  __iter__
File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 239, in handlewsgirequest: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types]
         Expected: (self, ints: Iterable[int])
  Actually passed: (self, ints: mercurial.hgweb.common.ErrorResponse)
  The following methods aren't implemented on mercurial.hgweb.common.ErrorResponse:
  __iter__
File "/mnt/c/Users/Matt/hg/mercurial/wireprotov2server.py", line 91, in handlehttpv2request: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types]
         Expected: (self, ints: Iterable[int])
  Actually passed: (self, ints: mercurial.hgweb.common.ErrorResponse)
  The following methods aren't implemented on mercurial.hgweb.common.ErrorResponse:
  __iter__

Differential Revision: https://phab.mercurial-scm.org/D10182

Details

Committed
mharbison72Mar 11 2021, 9:07 PM
Differential Revision
D10182: wireprotoserver: convert ErrorResponse to bytes
Parents
rHGed0899e01628: verify: convert an exception to bytes before logging
Branches
Unknown
Tags
Unknown