On Thu, 2011-01-20 at 22:45 +0100, Pierre-Yves wrote:
> On Mon, 2011-01-17 at 09:25 -0500, James Antill wrote:
> > 
> > 1. default_header should be inside the DotPlot class.
> > 
> > 2. The big == 'ascii-tree' tests should be merged a lot more, as most
> > of the code is the same. Just using dot=None, and still passing
> > dot=dot in the ascii-tree branch should be fine.
> 
> Thanks for your comments.
> The attached patch correct them and fix --tree-obsoletes and
> --tree-conflicts as well. The four tree options are then converted, they
> do not show up in the help anymore but can still be used.
> 
> Let me know how I can still improve it.

 Just a couple of minor things, if you don't mind :)

1. There's two or three changes like:

-        for rpkg in sorted(rpkgs):
-            if pkg.verEQ(rpkg): # Remove deps. on self.
-                continue
[...]
+        if str(kw['tree_level']).lower() == 'all' or \
+            int(kw['tree_level']) > int(lim):
+                for rpkg in sorted(rpkgs):
+                    if pkg.verEQ(rpkg): # Remove deps. on self.
+                        continue

...can you just change those to:

+        if str(kw['tree_level']).lower() == 'all' or \
+            int(kw['tree_level']) > int(lim):
+            return

...so we don't have the indentation change?


2. There are three places where this happens:

+        if dot is None:
+            self._tree_print_req(pkg, req, level)
+            lim = level
+        else:
+            dot.addPackage(pkg, rpkgs)
+            lim = level + 1

...why is "lim" a different number depending on if it's ascii or dot?


_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to