diff --git a/bin/packages/Paste.py b/bin/packages/Paste.py index de02b887..3b81c7fe 100755 --- a/bin/packages/Paste.py +++ b/bin/packages/Paste.py @@ -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): diff --git a/bin/packages/lib_refine.py b/bin/packages/lib_refine.py index 43d3654b..6606566c 100644 --- a/bin/packages/lib_refine.py +++ b/bin/packages/lib_refine.py @@ -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