diff --git a/plugins/module_utils/common/conversion.py b/plugins/module_utils/common/conversion.py index 83809c7d3..e58d497e8 100644 --- a/plugins/module_utils/common/conversion.py +++ b/plugins/module_utils/common/conversion.py @@ -80,7 +80,7 @@ def bgp_as_is_valid(self, value): return False try: asn = str(value) - except: + except UnicodeEncodeError: msg = f"BGP ASN ({value}) could not be converted to a string." self.bgp_as_invalid_reason = msg return False