Skip to content

Commit

Permalink
Fix type hints to allow Path
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrudd2 authored and oroulet committed May 1, 2024
1 parent b9fa93f commit b543178
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions asyncua/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ async def set_security_string(self, string: str) -> None:
async def set_security(
self,
policy: Type[ua.SecurityPolicy],
certificate: Union[str, uacrypto.CertProperties, bytes],
private_key: Union[str, uacrypto.CertProperties, bytes],
certificate: Union[str, uacrypto.CertProperties, bytes, Path],
private_key: Union[str, uacrypto.CertProperties, bytes, Path],
private_key_password: Optional[Union[str, bytes]] = None,
server_certificate: Optional[Union[str, uacrypto.CertProperties, bytes]] = None,
mode: ua.MessageSecurityMode = ua.MessageSecurityMode.SignAndEncrypt,
Expand Down
2 changes: 1 addition & 1 deletion asyncua/server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def __str__(self):
return f"OPC UA Server({self.endpoint.geturl()})"
__repr__ = __str__

async def load_certificate(self, path_or_content: Union[str, bytes], format: str = None):
async def load_certificate(self, path_or_content: Union[str, bytes, Path], format: str = None):
"""
load server certificate from file, either pem or der
"""
Expand Down

0 comments on commit b543178

Please sign in to comment.