mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
Add hotfixes
This commit is contained in:
parent
8803c8447a
commit
9ee61db2cf
2 changed files with 10 additions and 4 deletions
|
@ -104,10 +104,14 @@ class Paste(object):
|
|||
|
||||
paste = self.cache.get(self.p_path)
|
||||
if paste is None:
|
||||
with gzip.open(self.p_path, 'rb') as f:
|
||||
paste = f.read()
|
||||
self.cache.set(self.p_path, paste)
|
||||
self.cache.expire(self.p_path, 300)
|
||||
try:
|
||||
with gzip.open(self.p_path, 'rb') as f:
|
||||
paste = f.read()
|
||||
self.cache.set(self.p_path, paste)
|
||||
self.cache.expire(self.p_path, 300)
|
||||
except:
|
||||
return ''
|
||||
pass
|
||||
return paste
|
||||
|
||||
def get_p_content_as_file(self):
|
||||
|
|
|
@ -34,6 +34,7 @@ def checking_MX_record(r_serv, adress_set):
|
|||
# Transforming the set into a string
|
||||
MXdomains = re.findall("@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,20}", str(adress_set).lower())
|
||||
resolver = dns.resolver.Resolver()
|
||||
resolver.nameservers = ['149.13.33.69']
|
||||
resolver.timeout = 5
|
||||
resolver.lifetime = 2
|
||||
if MXdomains != []:
|
||||
|
@ -86,6 +87,7 @@ def checking_A_record(r_serv, domains_set):
|
|||
num = len(domains_set)
|
||||
WalidA = set([])
|
||||
resolver = dns.resolver.Resolver()
|
||||
resolver.nameservers = ['149.13.33.69']
|
||||
resolver.timeout = 5
|
||||
resolver.lifetime = 2
|
||||
|
||||
|
|
Loading…
Reference in a new issue