statichttprepo: unbyteify several IOError messages
authorMatt Harbison <matt_harbison@yahoo.com>
Wed, 01 Mar 2023 13:31:17 -0500
changeset 50279 3eacb4a54313
parent 50278 ebf1a07539b9
child 50280 806ca6bd0719
statichttprepo: unbyteify several IOError messages Builtin errors generally want str messages.
mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py	Wed Mar 01 13:11:51 2023 -0500
+++ b/mercurial/statichttprepo.py	Wed Mar 01 13:31:17 2023 -0500
@@ -119,7 +119,7 @@
 
     def http_error_416(self, req, fp, code, msg, hdrs):
         # HTTP's Range Not Satisfiable error
-        raise _RangeError(b'Requested Range Not Satisfiable')
+        raise _RangeError('Requested Range Not Satisfiable')
 
 
 def build_opener(ui, authinfo):
@@ -134,7 +134,7 @@
 
         def __call__(self, path, mode=b'r', *args, **kw):
             if mode not in (b'r', b'rb'):
-                raise IOError(b'Permission denied')
+                raise IOError('Permission denied')
             f = b"/".join((self.base, urlreq.quote(path)))
             return httprangereader(f, urlopener)