SpriteLink / NIPAP

Neat IP Address Planner - NIPAP is the best open source IPAM in the known universe, challenging classical IP address management (IPAM) systems in many areas.
https://spritelink.github.io/NIPAP/
MIT License
543 stars 132 forks source link

Searching for a string starting with "or" causes error #1394

Open garberg opened 3 months ago

garberg commented 3 months ago

Searching for a string which starts with "or" causes pynipap to throw an exception:

$ ./nipap a l orasdf
Searching for prefixes in any VRF...
Traceback (most recent call last):
  File "*snip*./nipap", line 165, in <module>
    cmd.exe(cmd.arg, cmd.exe_options, args)
  File "*snip*/NIPAP/nipap-cli/nipap_cli/nipap_cli.py", line 594, in list_prefix
    res = Prefix.smart_search(search_string, { 'parents_depth': -1,
  File "*snip*/NIPAP/nipap-cli/tracing.py", line 77, in decorated
    return f(*args, **kwargs)
  File "*snip*/NIPAP/nipap-cli/pynipap.py", line 1128, in smart_search
    result['interpretation'] = smart_result['interpretation']
TypeError: 'NoneType' object is not subscriptable