Skip to content

Conversation

@ChristopheDuong
Copy link
Contributor

As also mentioned by Ivan@renardeinside on gitter, I encountered this bug and made a fix for it (plus a test):

Hi everyone.
I found something strange in HOCONConverter.convert(config,"hocon").
Probably i haven't enough understanding, but if you want to convert come config with unresolved substitution, you got strange result.
Suppose, you have file like this

parameter = ${substition.v1}

Then you parse this file and you won't resolve substitution:

config = ConfigFactory.parse_file("example.conf",resolve=False)

Then if you convert this config you got this result code:

print(HOCONConverter.convert(config,"hocon"))

output:

parameter = [ConfigValues: [ConfigSubstitution: substition.v1]]

But probably the result should be:

parameter = ${substition.v1}

@coveralls
Copy link

coveralls commented Nov 12, 2018

Coverage Status

Coverage decreased (-0.4%) to 96.412% when pulling 40dc608 on ChristopheDuong:master into 0390324 on chimpler:master.

@darthbear
Copy link
Member

Thank you @ChristopheDuong for your PR!

@darthbear darthbear merged commit a38024b into chimpler:master Nov 15, 2018
@darthbear
Copy link
Member

Thanks @ChristopheDuong for your contribution. Your fix was pushed to pyhocon==0.3.48

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants