Bart Smaalders wrote:

> try:
>       for v,d in zip(v_list, repeat(self.variants)) \
>           + zip(f_list, repeat(self.facets)):
>               d.setdefault(v, set()).add(action.attrs[v])
> except TypeError:
>       raise actions.InvalidActionError(action,
>           _("%s '%s' specified multiple times") % v.split(".", 1))

I generally avoid wrapping a bunch of code with a core python exception
handler, because you never know exactly why the exception occurred (maybe
v_list was an int or something).  But it seems safe enough here, and
simpler.

Thanks,
Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to