X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=ctypescrypto%2Fbio.py;h=b1700b9a869ca80dd1eba7dba1c13117782202b0;hb=92df3e73921ba7b8756bfab1af4189dab7cc610e;hp=2743f705032ab407e8583c5bfe04c0a89125739b;hpb=26cea2b5ab48f099b08a1cde56cf1bec0062a584;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)