##// END OF EJS Templates
encoding: force a few Errors to bytes before passing to `error.Abort`...
Matt Harbison -
r48820:28c62f83 default
parent child Browse files
Show More
@@ -240,7 +240,9 b' def fromlocal(s):'
240 b"decoding near '%s': %s!" % (sub, pycompat.bytestr(inst))
240 b"decoding near '%s': %s!" % (sub, pycompat.bytestr(inst))
241 )
241 )
242 except LookupError as k:
242 except LookupError as k:
243 raise error.Abort(k, hint=b"please check your locale settings")
243 raise error.Abort(
244 pycompat.bytestr(k), hint=b"please check your locale settings"
245 )
244
246
245
247
246 def unitolocal(u):
248 def unitolocal(u):
@@ -306,7 +308,9 b' def lower(s):'
306 except UnicodeError:
308 except UnicodeError:
307 return s.lower() # we don't know how to fold this except in ASCII
309 return s.lower() # we don't know how to fold this except in ASCII
308 except LookupError as k:
310 except LookupError as k:
309 raise error.Abort(k, hint=b"please check your locale settings")
311 raise error.Abort(
312 pycompat.bytestr(k), hint=b"please check your locale settings"
313 )
310
314
311
315
312 def upper(s):
316 def upper(s):
@@ -333,7 +337,9 b' def upperfallback(s):'
333 except UnicodeError:
337 except UnicodeError:
334 return s.upper() # we don't know how to fold this except in ASCII
338 return s.upper() # we don't know how to fold this except in ASCII
335 except LookupError as k:
339 except LookupError as k:
336 raise error.Abort(k, hint=b"please check your locale settings")
340 raise error.Abort(
341 pycompat.bytestr(k), hint=b"please check your locale settings"
342 )
337
343
338
344
339 if not _nativeenviron:
345 if not _nativeenviron:
General Comments 0
You need to be logged in to leave comments. Login now