Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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