move expunge to end
This commit is contained in:
parent
2d841031eb
commit
545dab0b59
1 changed files with 1 additions and 1 deletions
|
@ -79,6 +79,7 @@ class RemoveDuplicateImapMessages:
|
||||||
self._log.error('Error, server replied: %s', unseen_data)
|
self._log.error('Error, server replied: %s', unseen_data)
|
||||||
return False
|
return False
|
||||||
self._process_message(message_id, data[0])
|
self._process_message(message_id, data[0])
|
||||||
|
self.imap.expunge()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _process_message(self, message_id, data):
|
def _process_message(self, message_id, data):
|
||||||
|
@ -116,7 +117,6 @@ class RemoveDuplicateImapMessages:
|
||||||
self.duplicates_count += 1
|
self.duplicates_count += 1
|
||||||
else:
|
else:
|
||||||
self.messages_hashes.append(msg_hash)
|
self.messages_hashes.append(msg_hash)
|
||||||
self.imap.expunge()
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def connect_imap(self):
|
def connect_imap(self):
|
||||||
|
|
Loading…
Reference in a new issue