@@ -26,9 +26,6 @@ def __init__(self, tag: int, type: int, sha: str):
2626 self .type = CredType (type )
2727 self .sha = sha
2828
29- def is_ok (response_lines ):
30- return not any ("ERROR" in line for line in response_lines )
31-
3229class CredStore :
3330 def __init__ (self , at_client ):
3431 self .at_client = at_client
@@ -80,7 +77,7 @@ def write(self, tag: int, type: CredType, file: io.TextIOBase):
8077 if type == CredType .ANY :
8178 raise ValueError
8279 cert = file .read ().rstrip ()
83- return is_ok ( self .at_client .at_command (f'AT%CMNG=0,{ tag } ,{ type .value } ,"{ cert } "' ) )
80+ return self .at_client .at_command (f'AT%CMNG=0,{ tag } ,{ type .value } ,"{ cert } "' )
8481
8582 def delete (self , tag : int , type : CredType ):
8683 """Delete a credential from the modem
@@ -90,7 +87,7 @@ def delete(self, tag: int, type: CredType):
9087
9188 if type == CredType .ANY :
9289 raise ValueError
93- return is_ok ( self .at_client .at_command (f'AT%CMNG=3,{ tag } ,{ type .value } ' ) )
90+ return self .at_client .at_command (f'AT%CMNG=3,{ tag } ,{ type .value } ' )
9491
9592 def keygen (self , tag : int , file : io .BufferedIOBase , attributes : str = '' ):
9693 """Generate a new private key and return a certificate signing request in DER format"""
0 commit comments