Merge branch 'qcloudapi' into 'master'
删除多余代码 See merge request !24
Showing
1 changed file
with
0 additions
and
6 deletions
@@ -45,12 +45,6 @@ sys.setdefaultencoding('utf8') | @@ -45,12 +45,6 @@ sys.setdefaultencoding('utf8') | ||
45 | ''' | 45 | ''' |
46 | def dns_inqure(SecretId,SecretKey,domain_name,value): | 46 | def dns_inqure(SecretId,SecretKey,domain_name,value): |
47 | ret = {} | 47 | ret = {} |
48 | - # 通过传入的域名参数简单判断域名格式是否正确 | ||
49 | - domain_regex = re.compile(r'(?:[A-Z0-9_](?:[A-Z0-9-_]{0,247}[A-Z0-9])?\.)+(?:[A-Z]{2,6}|[A-Z0-9-]{2,}(?<!-))\Z',re.IGNORECASE) | ||
50 | - if not domain_regex.match(domain_name): | ||
51 | - ret["code"] = 2 | ||
52 | - ret["err"] = "域名格式不对" | ||
53 | - return ret | ||
54 | # 通过传入的域名来获取domain和subDomain值 | 48 | # 通过传入的域名来获取domain和subDomain值 |
55 | domain = '.'.join(domain_name.split('.')[-2:]) | 49 | domain = '.'.join(domain_name.split('.')[-2:]) |
56 | subDomain = '.'.join(domain_name.split('.')[:-2]) | 50 | subDomain = '.'.join(domain_name.split('.')[:-2]) |
-
Please register or login to post a comment