add debug
This commit is contained in:
parent
1f04a016a3
commit
5526801f30
1 changed files with 13 additions and 7 deletions
|
@ -106,7 +106,9 @@ class BackupImap:
|
||||||
try:
|
try:
|
||||||
search_response, search_data = self.imap.search('UTF-8', 'UNDELETED')
|
search_response, search_data = self.imap.search('UTF-8', 'UNDELETED')
|
||||||
search_succeeded = True
|
search_succeeded = True
|
||||||
except Exception as error:
|
except imaplib.IMAP4.error as error:
|
||||||
|
error_str = f"{error.__str__}"
|
||||||
|
if 'got more than' in error_str:
|
||||||
imaplib._MAXLINE += 10000
|
imaplib._MAXLINE += 10000
|
||||||
self._log.debug(
|
self._log.debug(
|
||||||
"Error searching mailbox, increasing maxline to %s. %s",
|
"Error searching mailbox, increasing maxline to %s. %s",
|
||||||
|
@ -179,6 +181,10 @@ class BackupImap:
|
||||||
message_path,
|
message_path,
|
||||||
error
|
error
|
||||||
)
|
)
|
||||||
|
else:
|
||||||
|
self._log.debug(
|
||||||
|
"Skipping already backed up message"
|
||||||
|
)
|
||||||
|
|
||||||
def _backedup_message(self, message_id, mailbox):
|
def _backedup_message(self, message_id, mailbox):
|
||||||
for message in self.data['backedup_messages']:
|
for message in self.data['backedup_messages']:
|
||||||
|
|
Loading…
Reference in a new issue