# HG changeset patch # User Jeff Hammel # Date 1291746068 28800 # Node ID 9fac43403d7e035471f5c286659e91239845880e # Parent 7fe6f1e923bbd0dc0105c0251f13b844c925ff6c stub out a function to get unique components diff -r 7fe6f1e923bb -r 9fac43403d7e bzconsole/main.py --- a/bzconsole/main.py Tue Dec 07 09:16:07 2010 -0800 +++ b/bzconsole/main.py Tue Dec 07 10:21:08 2010 -0800 @@ -56,6 +56,20 @@ assert product in configuration['product'], 'Product %s not found' % product return sorted(configuration['product'][product]['component'].keys()) + def _unique_components(self): + """returns a dict of unique component, product""" + retval = {} + dupe = set() + for product in self.products(): + for component in self.components(product): + if component in retval: + dupe.add(component) + else: + retval[component] = product + for d in dupe: + del retval[d] + return retval + def new(self, product, component, title, version=None, description=None): """file a new bug. username and password must be set"""