-
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.
Merge pull request #7 from sageteamorg/develop
Develop
- Loading branch information
Showing
22 changed files
with
1,129 additions
and
1,533 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
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.