← Back to team overview

anvil-dev team mailing list archive

Re: [Devstackpy] execute_template() shell argument

 

Title: Re: [Devstackpy] execute_template() shell argument
Sure,

It seemed liked it stopped python from escaping some of the mysql commands, like the stuff inside quotes.

If your change doesn’t need that then might as well remove it.

>From what I remember it was needed, but might not be if investigated more.

On 3/20/12 6:22 PM, "Doug Hellmann" <doug.hellmann@xxxxxxxxxxxxx> wrote:

I guess the question really is, why is it a shell command sometimes and not other times?

Doug

On Mar 20, 2012, at 6:50 PM, Joshua Harlow <harlowja@xxxxxxxxxxxxx> wrote:

Re: [Devstackpy] execute_template() shell argument I think the subprocess says for a shell command it should be a string rather than a list.

Or that’s what I thought.

That’s why that is there. If we can get rid of the flag then I’m all for it.

On 3/20/12 3:07 PM, "Doug Hellmann" <doug.hellmann@xxxxxxxxxxxxx> wrote:

Joshua,

The utils.execute_template() function and the execute() function in the shell module use a "shell" flag and treat the incoming command differently. That's causing some confusion with the db commands like grant_all, since the commands have some funky quote escaping. Is there any reason to parse that command line, substitute values in the individual parts, then re-assemble it to a single big string before executing it? I could either skip the parsing, or skip the reassembly, but I wasn't sure why it ended up the way it is now so I wasn't sure which way to go.

I'll be on IRC tomorrow if my question is too vague to make sense. :-)

Doug




Follow ups

References