Update README.md to enhance MicromailClient documentation and add exceptions section; modify error handling in write method to raise NoSocketError
This commit is contained in:
parent
3795f8d8c0
commit
02e6f3fbcc
2 changed files with 59 additions and 27 deletions
|
|
@ -110,7 +110,7 @@ class MicromailClient:
|
|||
|
||||
def write(self, data: str | bytes) -> None:
|
||||
if self.socket is None:
|
||||
raise Error("No socket to write to.")
|
||||
raise NoSocketError
|
||||
|
||||
if isinstance(data, str):
|
||||
data = data.encode()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue