-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sage_imap): enhance imap service
- - enhance EmailMessage dataclass - refactor services and more simplification - remove side effects - remove docstrs (later will be fix) - restructure of directory names for better naming - regenerate stubs - add uid feature also - now email message can grab sequence number and uid - now size of emails is added - enhance email iterator
- Loading branch information
1 parent
723140c
commit ccff76b
Showing
19 changed files
with
859 additions
and
1,320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from functools import wraps | ||
|
||
from sage_imap.exceptions import IMAPMailboxSelectionError | ||
|
||
|
||
def mailbox_selection_required(func): | ||
@wraps(func) | ||
def wrapper(self, *args, **kwargs): | ||
if not self.current_selection: | ||
raise IMAPMailboxSelectionError("No mailbox selected.") | ||
return func(self, *args, **kwargs) | ||
|
||
return wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.