]> www.wagner.pp.ru Git - oss/ctypescrypto.git/blobdiff - ctypescrypto/bio.py
Fixes some style. Improved tests coverage for bio,oid,digest and cipher. Prepare...
[oss/ctypescrypto.git] / ctypescrypto / bio.py
index 2743f705032ab407e8583c5bfe04c0a89125739b..b1700b9a869ca80dd1eba7dba1c13117782202b0 100644 (file)
@@ -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)