Yes.  But in general, ConfigParser from Python 3.2 and on defaults to
crapping out when it finds duplicate keys (which is the parser used by
PasteDeploy).  So, I have the same problem in my pyramid application when I
run the script to initialize the DB based on the settings in the INI file.

Part of the benefit of an INI file is to have all the configurable options
in one place.  :)  So, I'd prefer to not have to parse it out if I can
avoid it.


On Wed, Mar 13, 2013 at 2:42 PM, Roberto De Ioris <[email protected]> wrote:

>
> > I can't seem to find anyone else having this issue, but I'd be very
> > surprised if I was the only one.
> >
> > Essentially, I'm trying to have uwsgi manage 2 external processes for me
> > using these instructions:
> > http://uwsgi-docs.readthedocs.org/en/latest/AttachingDaemons.html
> > However,
> > having two entries in an INI file with the same key in the same section
> > gives a configparser.DuplicateOptionError exception when using Python 3.2
> > or greater.  This is due to a change they made where the default setting
> > of
> > the config parser is strict=True (the docs state "Changed in version 3.2:
> > In previous versions of configparser behaviour matched strict=False.").
> >  So, the default is that you can't have duplicate keys in a section
> unless
> > you pass strict=False into ConfigParser().
> >
> > I filed an issue with PasteDeploy (
> >
> https://bitbucket.org/ianb/pastedeploy/issue/13/python-32-changed-configparser-to-default
> ),
> > but unfortunately I keep running into the same problem for every time
> > something wants to read the INI file (not just PasteDeploy).
> >
> > Is there an alternate way of doing this?  Maybe some way of passing in a
> > list?
> >
> > -Tim
>
>
> As you are talking about python code, i have to assume you are referring
> to the parser of pastdeploy that finding the uwsgi stanza with duplicated
> keys explodes.
>
> Can't you simply put the uwsgi config in another file ?
>
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to