util: rm hfu, cleaner bh2u
This commit is contained in:
@@ -462,7 +462,6 @@ def to_bytes(something, encoding='utf8') -> bytes:
|
||||
|
||||
|
||||
bfh = bytes.fromhex
|
||||
hfu = binascii.hexlify
|
||||
|
||||
|
||||
def bh2u(x: bytes) -> str:
|
||||
@@ -473,7 +472,7 @@ def bh2u(x: bytes) -> str:
|
||||
>>> bh2u(x)
|
||||
'01020A'
|
||||
"""
|
||||
return hfu(x).decode('ascii')
|
||||
return x.hex()
|
||||
|
||||
|
||||
def user_dir():
|
||||
|
||||
Reference in New Issue
Block a user