On 02/20/11 00:33, Danek Duvall wrote:
If you specify the same variant (or facet) multiple times on the same
action, you get a stacktrace due to a TypeError. The solution is to raise
an InvalidActionError instead, and things should handle that much better.
The bug is
15979 manifest code blows up if variants or facets multiply-specified
and the webrev is at
http://cr.opensolaris.org/~dduvall/pkg-bug15979/
Thanks for doing this...
I'd be inclined to catch the exception rather than test explicitly:
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))
- Bart
--
Bart Smaalders Solaris Kernel Performance
[email protected] http://blogs.sun.com/barts
"You will contribute more with Mercurial than with Thunderbird."
"Civilization advances by extending the number of important
operations which we can perform without thinking about them."
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss