mirror of
https://github.com/fastogt/pyfastogt
synced 2025-03-09 23:38:55 +00:00
is_valid_email
This commit is contained in:
parent
4efd0656b8
commit
89655373d4
1 changed files with 7 additions and 0 deletions
|
@ -33,6 +33,13 @@ class CompileInfo(object):
|
||||||
self.flags_.extend(other_args)
|
self.flags_.extend(other_args)
|
||||||
|
|
||||||
|
|
||||||
|
def is_valid_email(email: str) -> bool:
|
||||||
|
if not re.match('[^@]+@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$', email):
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
def read_file_line_by_line_to_list(file) -> list:
|
def read_file_line_by_line_to_list(file) -> list:
|
||||||
if not os.path.exists(file):
|
if not os.path.exists(file):
|
||||||
raise BuildError('file path: {0} not exists'.format(file))
|
raise BuildError('file path: {0} not exists'.format(file))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue