On Mon, Jun 8, 2009 at 10:13 PM, Jon Nelson<jnelson@???> wrote:
> After struggling with Paste Deploy (paster serve) for far too long,
> I'm wondering if I'm just doing it wrong or what.
>
> It seems to me that I should be able to do something like this:
>
> somefile.ini
> =========
> [DEFAULT]
> listen_host = 127.0.0.1
> listen_port = 4001
> ....
>
> [server:main]
> use = egg:Paste#cherrypy
> host = %(listen_host)s
> port = %(listen_port)s
> numthreads = 10
>
> and then later
>
> paster serve somefile.ini listen_port=10000
> and have cherry py listening on port 10000. Basically, I want the
> config file to override the DEFAULT section.
> Usually commandline options override config files anyway. Am I crazy?
>
> Secondly, it seems as though if I had another config file referenced
> in somefile.ini, via say config:someotherfile.ini, that the [DEFAULTS]
> section would propagate (and presumably get overwritten by [DEFAULTS]
> section, if present, in someotherfile.ini).
>
> Am I hitting shortcomings or just not doing it right?
Yes, that is what is happening; the [DEFAULTS] is propagating through,
and the [DEFAULTS] in the second file take precedence. Unfortunately
that's also what is happening in the first case; anything passed
through on the command line fills in global_conf (the same thing
[DEFAULTS] fills in) except just like in this other case the
[DEFAULTS] in the file overwrites the ones you pass in on the command
line.
I looked into the code some, and it would touch a bunch of stuff to
change this properly, as there'd really have to be a set of global
forced options that would get propagated everywhere, the opposite of
how [DEFAULT] is propagated.
--
Ian Bicking | http://blog.ianbicking.org | http://topplabs.org/civichacker
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Paste Users" group.
To post to this group, send email to paste-users@???
To unsubscribe from this group, send email to paste-users+unsubscribe@???
For more options, visit this group at
http://groups.google.com/group/paste-users?hl=en
-~----------~----~----~----~------~----~------~--~---