Kojihub fails after F14 -> f15 upgrade

Mike McLean mikem at redhat.com
Thu Jun 9 19:08:04 UTC 2011


On 06/09/2011 09:13 AM, Severin Gehwolf wrote:
> As far as I can tell _quoteparams is a python function of the PostgreSQL
> python driver. Concluding from its name, this was never meant to be used
> outside the driver itself. Now, there is an updated pg Python driver
> part of F15 and this improper API usage is causing the problem.

I tend to read the single leading underscore as "use at your own risk" 
and double leading underscore as "no, really. don't use this." The 
double leading underscore is the standard for private names within 
python classes.

> The question is:
> Is there a way to provide debug output/logging without using pg driver
> internal functions?

Short of writing a separate quoting function, you could do something 
less optimal, like:
1) operation % parameters
or
2) "%r %r" % (operation,parameters)

The first doesn't quote, but does put the parameters in place. It might 
make some string-heavy commands hard to read. The second loses no data, 
but does not insert the parameters in place, which will be hard to read.

I'll be patching koji to do one of these shortly, unless I go crazy and 
write my own quoting function.


More information about the buildsys mailing list