Skip to content

Commit

Permalink
Catch TypeError exception when converting port number to int()
Browse files Browse the repository at this point in the history
  • Loading branch information
zstyblik committed Sep 5, 2024
1 parent 5f50a4f commit 5b1f37f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion action_plugins/apache_ports_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def run(self, tmp=None, task_vars=None):
vhost.get("servername", "unknown")
)
raise AnsibleError(msg) from exception
except ValueError as exception:
except (TypeError, ValueError) as exception:
msg = "failed to convert port '{}' of vhost '{}' to int".format(
vhost.get("port", None),
vhost.get("servername", "unknown"),
Expand Down

0 comments on commit 5b1f37f

Please sign in to comment.