Skip to content

Add support for 'anyxml' element - seen in ietf-netconf.yang rpc model #284

Description

@eduardpo

Hi,

ietf-netconf.yang --> ietf_netconf.py
Traceback (most recent call last):
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/bin/pyang", line 545, in <module>
    run()
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/bin/pyang", line 514, in run
    emit_obj.emit(ctx, modules, fd)
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 203, in emit
    build_pybind(ctx, modules, fd)
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 427, in build_pybind
    ctx, fd, rpcs, module, module, register_paths=False, path="/%s_rpc" % (safe_name(module.arg))
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 760, in get_children
    register_paths=register_paths,
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 1463, in get_element
    register_paths=register_paths,
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 760, in get_children
    register_paths=register_paths,
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 1463, in get_element
    register_paths=register_paths,
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 760, in get_children
    register_paths=register_paths,
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 1522, in get_element
    cls, elemtype = copy.deepcopy(build_elemtype(ctx, element.search_one("type")))
  File "/local/home/eduardp/devices/siklu-tests/pyang-binder/src/pyangbind/pyangbind/plugin/pybind.py", line 1205, in build_elemtype
    pattern_stmt = et.search_one("pattern") if not et.search_one("pattern") is None else False
AttributeError: 'NoneType' object has no attribute 'search_one'
Bindings failed!

Is it a normal behavior?

Thanks,
Ed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions