mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +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 re
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
emailRe = re.compile(r"^(\w&.+-]+!)*[\w&.+-]+@"
|
from .web import _ipAddr, _domain
|
||||||
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)
|
emailRe = re.compile(r"^(\w&.+-]+!)*[\w&.+-]+@(%s|%s)$" % (_domain, _ipAddr),
|
||||||
|
re.I)
|
||||||
|
|
||||||
def getSocket(host):
|
def getSocket(host):
|
||||||
"""Returns a socket of the correct AF_INET type (v4 or v6) in order to
|
"""Returns a socket of the correct AF_INET type (v4 or v6) in order to
|
||||||
|
Loading…
Reference in New Issue
Block a user