LGTM, thanks On Mon, Nov 11, 2013 at 6:44 PM, Santi Raffa <[email protected]> wrote:
> While it's generally better to beg for forgiveness than ask for > permission in Python, it's not a good idea to rely on exceptions to > model control flow, especially if the resulting code is simpler. > > Signed-off-by: Santi Raffa <[email protected]> > --- > lib/objects.py | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/lib/objects.py b/lib/objects.py > index be427aa..dc86478 100644 > --- a/lib/objects.py > +++ b/lib/objects.py > @@ -75,10 +75,8 @@ def FillDict(defaults_dict, custom_dict, > skip_keys=None): > ret_dict.update(custom_dict) > if skip_keys: > for k in skip_keys: > - try: > + if k in ret_dict: > del ret_dict[k] > - except KeyError: > - pass > return ret_dict > > > -- > 1.8.4.1 > > Hrvoje Ribicic Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
