mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
utils.net: Use _ipAddr and _domain from utils.web to define emailRe
Signed-off-by: James McCoy <jamessan@users.sourceforge.net>
This commit is contained in:
parent
db3746d122
commit
6ab807be43
@ -35,9 +35,10 @@ Simple utility modules.
|
||||
import re
|
||||
import socket
|
||||
|
||||
emailRe = re.compile(r"^(\w&.+-]+!)*[\w&.+-]+@"
|
||||
r"(([0-9a-z]([0-9a-z-]*[0-9a-z])?\.)[a-z]{2,6}|"
|
||||
r"([0-9]{1,3}\.){3}[0-9]{1,3})$", re.I)
|
||||
from .web import _ipAddr, _domain
|
||||
|
||||
emailRe = re.compile(r"^(\w&.+-]+!)*[\w&.+-]+@(%s|%s)$" % (_domain, _ipAddr),
|
||||
re.I)
|
||||
|
||||
def getSocket(host):
|
||||
"""Returns a socket of the correct AF_INET type (v4 or v6) in order to
|
||||
|
Loading…
Reference in New Issue
Block a user