##// END OF EJS Templates
pycompat: allow pycompat.sysbytes() even if input already is bytes...
Martin von Zweigbergk -
r44322:66af68d4 default
parent child Browse files
Show More
@@ -253,6 +253,8 b' if ispy3:'
253 253 This never raises UnicodeEncodeError, but only ASCII characters
254 254 can be round-trip by sysstr(sysbytes(s)).
255 255 """
256 if isinstance(s, bytes):
257 return s
256 258 return s.encode('utf-8')
257 259
258 260 def sysstr(s):
General Comments 0
You need to be logged in to leave comments. Login now