diff --git a/komrade/backend/crypt.py b/komrade/backend/crypt.py index 8be947c..eef5f53 100644 --- a/komrade/backend/crypt.py +++ b/komrade/backend/crypt.py @@ -35,6 +35,7 @@ class Crypt(Logger): # return zlib.adler32(binary_data) 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)!=bytes: k_b=k_b.decode() return k_b