Skip to content

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

@garberg

Description

@garberg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions