Skip to content

Commit

Permalink
DNSPOD 根域名自动判断#8
Browse files Browse the repository at this point in the history
  • Loading branch information
NewFuture committed Sep 4, 2017
1 parent b3d4884 commit 99ffdf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dns/dnspod.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ def request(action, param=None, **params):
def get_domain_info(domain):
"""
切割域名获取主域名和对应ID
TODO @记录支持
"""
domain_split = domain.split('.')
if len(domain_split) == 3: # 长度为3
Expand All @@ -80,6 +79,8 @@ def get_domain_info(domain):
break
else:
return None, None
if not sub: # root domain根域名https://github.com/NewFuture/DDNS/issues/9
sub = '@'
return did, sub


Expand Down

0 comments on commit 99ffdf0

Please sign in to comment.