Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

configparser breaks on duplicate sections #20

@myoung34

Description

@myoung34
$ poetry run tilty -c config.ini
Traceback (most recent call last):
  File "/home/myoung/.cache/pypoetry/virtualenvs/tilty-2nsyYZ1s-py3.7/bin/tilty", line 33, in <module>
    sys.exit(load_entry_point('Tilty', 'console_scripts', 'tilty')())
  File "/home/myoung/.cache/pypoetry/virtualenvs/tilty-2nsyYZ1s-py3.7/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/myoung/.cache/pypoetry/virtualenvs/tilty-2nsyYZ1s-py3.7/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/myoung/.cache/pypoetry/virtualenvs/tilty-2nsyYZ1s-py3.7/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/myoung/.cache/pypoetry/virtualenvs/tilty-2nsyYZ1s-py3.7/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/myoung/repos/github/tilty/tilty/cli.py", line 66, in run
    CONFIG.read(config_file)
  File "/home/myoung/.asdf/installs/python/3.7.2/lib/python3.7/configparser.py", line 696, in read
    self._read(fp, filename)
  File "/home/myoung/.asdf/installs/python/3.7.2/lib/python3.7/configparser.py", line 1065, in _read
    lineno)
configparser.DuplicateSectionError: While reading from 'config.ini' [line 18]: section 'webhook' already exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions