mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-10-28 03:35:51 +08:00
更改cname查询错误日志级别
This commit is contained in:
@@ -34,8 +34,8 @@ def get_cname(subdomain):
|
|||||||
resolver = resolve.dns_resolver()
|
resolver = resolve.dns_resolver()
|
||||||
try:
|
try:
|
||||||
answers = resolver.query(subdomain, 'CNAME')
|
answers = resolver.query(subdomain, 'CNAME')
|
||||||
except Exception as e:
|
except Exception as exception:
|
||||||
logger.log('DEBUG', e.args)
|
logger.log('TRACE', exception.args)
|
||||||
return None
|
return None
|
||||||
for answer in answers:
|
for answer in answers:
|
||||||
return answer.to_text() # 一个子域只有一个CNAME记录
|
return answer.to_text() # 一个子域只有一个CNAME记录
|
||||||
|
|||||||
Reference in New Issue
Block a user