On Sun, 2010-12-19 at 16:15 +0100, Pierre-Yves wrote: > Hi, > > Attached are two patches: > - The first one add an option --tree-level to the current output of > repoquery. > - The second one add an option --tree-format to be able to switch from > asci to dot (it relies on the first patch). > > I tested it against --tree-requires as --tree-whatrequires fails > (#611046).
This BZ is about broken sqlite DBs on someone's machine. And AFAICS here it works. Also it's "ascii" not "asci". And: + if not isinstance(kw['tree_level'], int) and kw['tree_level'].lower() != 'all': + try: kw['tree_level'] = int(kw['tree_level']) + except ValueError, er: kw['tree_level'] = 'all' ...return characters are pretty cheap, and having to put isinstance(blah, int) everywhere is not exactly awesome. And: + if (not isinstance(kw['tree_level'], int) and kw['tree_level'].lower() == 'all') or \ + (isinstance(kw['tree_level'], int) and int(kw['tree_level']) > int(nlevel)): ...here you don't need the '\', and I think "tree_level" means "the maximum level of the tree that we will show? If so you might want to change the option to --tree-level-max or something. _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel