changeset 50379:3eacb4a54313

statichttprepo: unbyteify several IOError messages Builtin errors generally want str messages.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 01 Mar 2023 13:31:17 -0500
parents ebf1a07539b9
children 806ca6bd0719
files mercurial/statichttprepo.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)