DiffSK / configobj

Python 3+ compatible port of the configobj library

Home Page:https://configobj.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: having a dict in the config file causes .merge method to fail

bob37van opened this issue · comments

Given two configuration files, A, and B, if A contains a dict item (such as defined by:
thisDict = """{'foo': 'bar')"""

then if cfgA=ConfigObj(A) and cfgB=ConfigObj(B) then
cfgA.merge(cfgB) # throws an exception

The .merge method iterates through dicts and successfully calls .merge on them, whereas it should iterate through only the dicts which are Sections.

I think I understand this bug report but I'm going to flag it to actually confirm in the code what may be happening