Beispiel #1
0
 def get_asn(self, asn):
     if asn in ASN_RANGE_OVERRIDE:
         return pdbinet.RdapAsn(self.override_result)
     elif pdbinet.asn_is_bogon(asn):
         return RdapLookup_get_asn(self, asn)
     else:
         raise pdbinet.RdapNotFoundError()
 def get_asn(self, asn):
     if asn in ASN_RANGE_OVERRIDE:
         r = pdbinet.RdapAsn(self.override_result)
         r._parse()
         r._parsed["name"] = "AS%d" % asn
         r._parsed["org_name"] = "ORG AS%d" % asn
         return r
     else:
         raise pdbinet.RdapNotFoundError("Test Not Found")