Duplicate Config Section when plugin already loaded #235

derks opened this Issue Feb 19, 2014 · 0 comments


None yet
1 participant

derks commented Feb 19, 2014

Get the following if [example_plugin] section exists in one of the main application configuration files, but also when the plugin config itself references the same section:

Traceback (most recent call last):
  File "/Users/derks/.env/myapp/bin/myapp", line 9, in <module>
    load_entry_point('myapp==0.9.12', 'console_scripts', 'myapp')()
  File "/Users/derks/Development/myapp/myapp/cli/main.py", line 27, in main
  File "/Users/derks/.env/myapp/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/core/foundation.py", line 501, in setup
  File "/Users/derks/.env/myapp/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/core/foundation.py", line 786, in _setup_plugin_handler
  File "/Users/derks/.env/myapp/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/core/foundation.py", line 712, in _resolve_handler
  File "/Users/derks/.env/myapp/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/ext/ext_plugin.py", line 83, in _setup
  File "/Users/derks/.env/myapp/lib/python2.7/site-packages/cement-2.2.0-py2.7.egg/cement/ext/ext_configparser.py", line 135, in add_section
    super(ConfigParserConfigHandler, self).add_section(section)
  File "/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ConfigParser.py", line 264, in add_section
    raise DuplicateSectionError(section)
ConfigParser.DuplicateSectionError: Section 'example_plugin' already exists

Cement should handle this properly... as well as be explicit (in the docs?) which config has precedence (the plugin config, or that app config).

@derks derks added this to the 2.2.2 Stable milestone Feb 19, 2014

@derks derks added bug labels Feb 19, 2014

@derks derks self-assigned this Feb 19, 2014

@derks derks added the dev/2.3.x label Feb 19, 2014

derks added a commit that referenced this issue Apr 16, 2014

derks added a commit that referenced this issue Apr 16, 2014

@derks derks closed this Apr 16, 2014

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