X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=ctypescrypto%2Frand.py;h=4bc073a1ceb63f727d6022e5586d85d577084dbf;hb=ca6a5055ad8a9ea82e9f42aff3c906903d5e6df7;hp=4cc86e297fe0151264c517133a96b4c32822aa10;hpb=7b9c29e43612629052e0ec875fd9ecbb35b0b02d;p=oss%2Fctypescrypto.git diff --git a/ctypescrypto/rand.py b/ctypescrypto/rand.py index 4cc86e2..4bc073a 100644 --- a/ctypescrypto/rand.py +++ b/ctypescrypto/rand.py @@ -47,7 +47,7 @@ def seed(data, entropy=None): If entropy is not None, it should be floating point(double) value estimating amount of entropy in the data (in bytes). """ - if type(data) != type(""): + if not isinstance(data,str): raise TypeError("A string is expected") ptr = c_char_p(data) size = len(data)