Skip to content

Commit

Permalink
Merge pull request #23 from plesk/handle-more-exceptions
Browse files Browse the repository at this point in the history
Handle parce exceptions carefully on checking sslmng output
  • Loading branch information
SandakovMM authored Mar 29, 2024
2 parents c02b69c + 6d9076a commit 8e09fd3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pleskdistup/actions/emails.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def _is_required(self) -> bool:
except json.JSONDecodeError:
log.warn(f"Failed to parse plesk sslmng results: {proc.stdout}")
return False
except KeyError as e:
log.warn(f"There is no parameter '{e}' in the sslmng output.")
return False
except Exception as e:
log.warn(f"Failed to check sslmng configuration for dovecot: {e}. Type is {type(e)}")
raise e

return True

Expand Down

0 comments on commit 8e09fd3

Please sign in to comment.