2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-17 21:25:37 +00:00
This commit is contained in:
quadrismegistus 2020-09-06 17:02:29 +01:00
parent 85fa1f190c
commit c11d490e5d

View File

@ -35,6 +35,7 @@ class Crypt(Logger):
# return zlib.adler32(binary_data) # return zlib.adler32(binary_data)
def force_binary(self,k_b): def force_binary(self,k_b):
if k_b is None: return b''
if type(k_b)==str: k_b=k_b.encode() if type(k_b)==str: k_b=k_b.encode()
if type(k_b)!=bytes: k_b=k_b.decode() if type(k_b)!=bytes: k_b=k_b.decode()
return k_b return k_b