state: use bytes.hex() instead of binascii.hexlify().decode()

This commit is contained in:
iomintz 2020-05-10 20:07:22 -05:00 committed by GitHub
parent 13a3f760e6
commit 755ab28311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,6 @@ import inspect
import gc
import os
import binascii
from .guild import Guild
from .activity import BaseActivity
@ -135,7 +134,7 @@ class ConnectionState:
gc.collect()
def get_nonce(self):
return binascii.hexlify(os.urandom(16)).decode('ascii')
return os.urandom(16).hex()
def process_listeners(self, listener_type, argument, result):
removed = []