Skip to content

Commit

Permalink
fix: avoid tls mode exception when pyyaml doesn't read it as a string…
Browse files Browse the repository at this point in the history
… (see #80)
  • Loading branch information
YoRyan committed Aug 12, 2023
1 parent 22591fb commit 28e0517
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mailrise/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def load_config(logger: Logger, file: io.TextIOWrapper) -> MailriseConfig:
yml_listen = yml.get('listen', {})

yml_tls = yml.get('tls', {})
yml_tls_mode = yml_tls.get('mode', 'off').upper()
yml_tls_mode = str(yml_tls.get('mode', 'off')).upper()
try:
tls_mode = TLSMode[yml_tls_mode]
except KeyError as exc:
Expand Down

0 comments on commit 28e0517

Please sign in to comment.