Skip to content

Commit

Permalink
Merge PR #3160 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by NL66278
  • Loading branch information
OCA-git-bot committed Jan 9, 2025
2 parents 961688e + 8ea268e commit 060cadd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fetchmail_attach_from_folder/models/fetchmail_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import re

from odoo import _, api, fields, models
from odoo.exceptions import UserError

_logger = logging.getLogger(__name__)

Expand All @@ -30,7 +31,11 @@ def parse_list_response(line):
if this.state != "done":
this.folders_available = _("Confirm connection first.")
continue
connection = this.connect()
try:
connection = this.connect()
except UserError:
this.folders_available = _("Confirm connection first.")
continue
list_result = connection.list()
if list_result[0] != "OK":
this.folders_available = _("Unable to retrieve folders.")
Expand Down

0 comments on commit 060cadd

Please sign in to comment.