marvin-zhao / pyang

Automatically exported from code.google.com/p/pyang
0 stars 0 forks source link

pyang abends when trying to translate from YANG to XSD #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. get the ietf-netconf YANG module contained in
ftp://ftp.rfc-editor.org/in-notes/internet-drafts/draft-ietf-netconf-4741bis-01.
txt

2. run pyang ietf-inet-types.yang ietf-netconf.yang
no errors reported.

3. run pyang -f xsd  -o ietf-netconf.xsd ietf-netconf.yang

What is the expected output? What do you see instead?

expect to see XSD output, instead saw:
Traceback (most recent call last):
  File "/usr/bin/pyang", line 186, in <module>
    run()
  File "/usr/bin/pyang", line 180, in run
    emit_obj.emit(ctx, module, fd)
  File "/usr/lib/python2.6/site-packages/pyang/translators/xsd.py", line
151, in emit
    emit_xsd(ctx, module, fd)
  File "/usr/lib/python2.6/site-packages/pyang/translators/xsd.py", line
270, in emit_xsd
    pre = "p" + i
TypeError: cannot concatenate 'str' and 'int' objects

What version of the product are you using? On what operating system?

pyang 0.9.3 on fedora 11 64 bit

Please provide any additional information below.

running pyang -f yin  -o ietf-netconf.yin ietf-netconf.yang works,
but then running pyang -f xsd  -o ietf-netconf.xsd ietf-netconf.yin
incurs the same output as above

Original issue reported on code.google.com by ellison....@gmail.com on 5 Oct 2009 at 5:16

GoogleCodeExporter commented 9 years ago
This bug is already fixed in subversion.

Original comment by mbj4...@gmail.com on 5 Oct 2009 at 7:36