misc: fix undefined variable 'e' (#57106)
gitea-wip/wcs/pipeline/head Build started... Details

This commit is contained in:
Lauréline Guérin 2021-09-20 15:17:33 +02:00
parent 5a9d88d6af
commit 9aa5753641
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
1 changed files with 1 additions and 2 deletions

View File

@ -356,8 +356,7 @@ def create_smtp_server(emails_cfg, smtp_timeout=None):
except socket.timeout as e:
publisher.record_error(_('Failed to connect to SMTP server (timeout)'), exception=e)
raise errors.EmailError('Failed to connect to SMTP server (timeout)')
except OSError:
# XXX: write message in a queue somewhere?
except OSError as e:
publisher.record_error(_('Failed to connect to SMTP server'), exception=e)
raise errors.EmailError('Failed to connect to SMTP server')
if not s.sock: