def __deletefolder(self, options): list_accounts = self._get_activeaccounts(options) if len(list_accounts) != 1: self.ui.error("you must supply only one account with '-a'") return 1 account = accounts.Account(self.config, list_accounts.pop()) return account.deletefolder(options.deletefolder)
def __migratefmd5(self, options): for accountname in self._get_activeaccounts(options): account = accounts.Account(self.config, accountname) localrepo = Repository(account, 'local') if localrepo.getfoldertype() != folder.Maildir.MaildirFolder: continue folders = localrepo.getfolders() for f in folders: f.migratefmd5(options.dryrun)
def __serverdiagnostics(self, options): self.ui.info(" imaplib2: %s (%s)" % (imaplib.__version__, imaplib.DESC)) for accountname in self._get_activeaccounts(options): account = accounts.Account(self.config, accountname) account.serverdiagnostics()