mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
fix ruff case SIM110 (#11215)
* fix ruff case SIM110 * Update plugins/module_utils/xenserver.py Co-authored-by: Felix Fontein <felix@fontein.de> * add changelog frag --------- Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -219,11 +219,7 @@ def is_valid_ip6_addr(ip6_addr):
|
||||
|
||||
ip6_addr_hextet_regex = re.compile("^[0-9a-f]{1,4}$")
|
||||
|
||||
for ip6_addr_hextet in ip6_addr_split:
|
||||
if not bool(ip6_addr_hextet_regex.match(ip6_addr_hextet)):
|
||||
return False
|
||||
|
||||
return True
|
||||
return all(ip6_addr_hextet_regex.match(ip6_addr_hextet) for ip6_addr_hextet in ip6_addr_split)
|
||||
|
||||
|
||||
def is_valid_ip6_prefix(ip6_prefix):
|
||||
|
||||
Reference in New Issue
Block a user