X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=ctypescrypto%2Fbio.py;fp=ctypescrypto%2Fbio.py;h=b1700b9a869ca80dd1eba7dba1c13117782202b0;hb=ca6a5055ad8a9ea82e9f42aff3c906903d5e6df7;hp=2743f705032ab407e8583c5bfe04c0a89125739b;hpb=7b9c29e43612629052e0ec875fd9ecbb35b0b02d;p=oss%2Fctypescrypto.git diff --git a/ctypescrypto/bio.py b/ctypescrypto/bio.py index 2743f70..b1700b9 100644 --- a/ctypescrypto/bio.py +++ b/ctypescrypto/bio.py @@ -42,7 +42,7 @@ class Membio(object): @param length - if specifed, limits amount of data read. If not BIO is read until end of buffer """ if not length is None: - if type(length)!=type(0): + if not isinstance(length,(int,long)): raise TypeError("length to read should be number") buf=create_string_buffer(length) readbytes=libcrypto.BIO_read(self.bio,buf,length)