mirror of
https://github.com/KevinMidboe/cloudflare-ddns.git
synced 2025-12-08 20:28:54 +00:00
split regex for PEP-8
This commit is contained in:
@@ -12,7 +12,8 @@ DDNS_ZONE = os.getenv('DDNS_ZONE')
|
||||
|
||||
|
||||
def validIP(ipString):
|
||||
ipRegex = '^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
|
||||
ipRegex = r'^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}' \
|
||||
r'([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$'
|
||||
return bool(re.search(ipRegex, str(ipString)))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user