[Buildbot-devel] Using dictionaries with WithProperties objects

Dustin J. Mitchell dustin at zmanda.com
Tue Dec 29 16:42:45 UTC 2009


On Tue, Dec 29, 2009 at 7:35 AM, Alexander O'Donovan-Jones
<Alexander at ccpgames.com> wrote:
> Does anyone know of a way to use WithProperties objects in conjunction with
> a dictionary.
>
> I’ve a dictionary containing some data like so:
>
> d = {‘foo’:’bar’, ‘fooo’:’baar’}
>
>
>
> I can’t simply do a d[WithProperties(‘%(var)s’)] call, since that will raise
> a KeyError when the cfg file is compiled.
>
> Any thoughts? Even a simple monkey patch would be useful if anyone has an
> idea along that avenue.

Can you give a wider context for this?  Where is the dictionary?  When
does it need to be evaluated?  Are you doing this in a custom step?

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com




More information about the devel mailing list