@@ -453,6 +453,7 @@ def _raw(self, method, headers, parts, identifiers, params, data_str, data_json,
453453
454454 if response_type in ['text/javascript' , 'application/javascript' , 'text/html' ]:
455455 # used by Cloudflare workers
456+
456457 if hasattr (response_data , 'decode' ):
457458 response_data = response_data .decode ('utf-8' )
458459 return {'success' : True , 'result' : str (response_data )}
@@ -877,14 +878,14 @@ def __init__(self, email=None, key=None, token=None, certtoken=None, debug=False
877878
878879 self ._base = None
879880
880- if email and not isinstance (email , str ):
881- raise TypeError ('email must be str' )
882- if key and not isinstance (key , str ):
883- raise TypeError ('key must be str' )
884- if token and not isinstance (token , str ):
885- raise TypeError ('token must be str' )
886- if certtoken and not isinstance (certtoken , str ):
887- raise TypeError ('certtoken must be str' )
881+ if email is not None and not isinstance (email , str ):
882+ raise TypeError ('email is %s - must be str' % ( type ( email )) )
883+ if key is not None and not isinstance (key , str ):
884+ raise TypeError ('key is %s - must be str' % ( type ( key )) )
885+ if token is not None and not isinstance (token , str ):
886+ raise TypeError ('token is %s - must be str' % ( type ( token )) )
887+ if certtoken is not None and not isinstance (certtoken , str ):
888+ raise TypeError ('certtoken is %s - must be str' % ( type ( certtoken )) )
888889
889890 try :
890891 config = read_configs (profile )
0 commit comments