tail-f-systems / JNC

JNC (Java NETCONF Client) is the name of a Java library for communicating with NETCONF agents, and a plugin for pyang (http://code.google.com/p/pyang/) to generate Java classes from YANG models, to be used by the JNC library.
Other
77 stars 87 forks source link

jnc.py generates files with line break after every character #80

Closed FileIOUtility closed 1 year ago

FileIOUtility commented 6 years ago

jnc.py generates files with line break after every character, eg. all package-info.java and schema files. There seems to be a problem in the fragment:

 with open(d + os.sep + file_name, 'w+') as f:
    if isinstance(file_content, str):
        f.write(file_content)
    else:
        for line in file_content:
            f.write(line)
            f.write('\n')
FileIOUtility commented 6 years ago

Workaround in https://github.com/FileIOUtility/JNC/blob/master/jnc.py

martin-volf commented 1 year ago

Not reproducible with recent changes.