hadiasghari / pyasn

Python IP address to Autonomous System Number lookup module. (Supports fast local lookups, and historical lookups using archived BGP dumps.)
Other
294 stars 72 forks source link

pyasn.get_as_prefixes() fails with string inputs #2

Closed hadiasghari closed 10 years ago

hadiasghari commented 10 years ago

e.g., db.get_as_prefixes('1128') will return None, while db.get_as_prefixes(1128) gives the correct output. The desired behavior would be for the function to cast the input into an int. In some cases its possible; in others, it fails, and the callee has amore meaningful response

hadiasghari commented 10 years ago

Also should add a unit test for this function