Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
ops_sdk
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PublicSource
ops_sdk
Commits
d2691043
Commit
d2691043
authored
Jun 26, 2019
by
shenshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加判断工具
parent
e11b10ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
setup.py
setup.py
+1
-1
tools.py
websdk/tools.py
+19
-0
No files found.
setup.py
View file @
d2691043
...
@@ -9,7 +9,7 @@ from distutils.core import setup
...
@@ -9,7 +9,7 @@ from distutils.core import setup
setup
(
setup
(
name
=
'opssdk'
,
name
=
'opssdk'
,
version
=
'0.0.1
3
'
,
version
=
'0.0.1
4
'
,
packages
=
[
'opssdk'
,
'opssdk.logs'
,
'opssdk.operate'
,
'opssdk.install'
,
'opssdk.get_info'
,
'opssdk.utils'
,
'websdk'
],
packages
=
[
'opssdk'
,
'opssdk.logs'
,
'opssdk.operate'
,
'opssdk.install'
,
'opssdk.get_info'
,
'opssdk.utils'
,
'websdk'
],
url
=
'https://github.com/ss1917/ops_sdk/'
,
url
=
'https://github.com/ss1917/ops_sdk/'
,
license
=
''
,
license
=
''
,
...
...
websdk/tools.py
View file @
d2691043
...
@@ -53,6 +53,25 @@ def is_mail(text, login_mail=None):
...
@@ -53,6 +53,25 @@ def is_mail(text, login_mail=None):
else
:
else
:
return
False
return
False
def
is_tel
(
tel
):
### 检查是否是手机号
ret
=
re
.
match
(
r"^1[35678]\d{9}$"
,
tel
)
if
ret
:
return
True
else
:
return
False
def
check_contain_chinese
(
check_str
):
### 检查是否包含汉字
"""
:param check_str:
:return:
"""
for
ch
in
check_str
:
if
u'
\u4e00
'
<=
ch
<=
u'
\u9fff
'
:
return
True
return
False
class
Executor
(
ThreadPoolExecutor
):
class
Executor
(
ThreadPoolExecutor
):
""" 线程执行类 """
""" 线程执行类 """
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment