Avoid codec spelling issues by just using the utf-8 default.

This commit is contained in:
Raymond Hettinger 2011-05-05 11:38:06 -07:00
commit 7c5dc912ba
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class Random(_random.Random):
if version == 2:
if isinstance(a, (str, bytes, bytearray)):
if isinstance(a, str):
a = a.encode("utf-8")
a = a.encode()
a += _sha512(a).digest()
a = int.from_bytes(a, 'big')