Skip to content
Permalink
Browse files
fixed type checking
  • Loading branch information
ssw committed Jan 10, 2023
1 parent 6081b44 commit 182a08f6eb16d3d3358f431925b67d4713deb8c7
Showing 1 changed file with 1 addition and 1 deletion.
@@ -92,7 +92,7 @@ def is_valid_prefix(prefix):

def is_valid_asn(asn):
# Check if the ASN is a string starting with "AS", followed by numbers or just a number
if type(asn) is int:
if asn.isdigit():
return True
if re.match(r'^[Aa][Ss]\d+$', asn):
return True

0 comments on commit 182a08f

Please sign in to comment.