A couple of quick comments on the code in client.py:

  - The series of if/else clauses can be reduced:

        field_dict = {
            "publisher": pfx,
            "sticky": str(p.sticky).lower(),
            "preferred": str(p == pref_pub).lower(),
            "enabled": str(p.disabled).lower()
        }

  - You can probably generate "output" from field_dict, too.

  - You should try to set it up so that the original loops over r.origins
    and r.mirrors remain where they are, rather than being duplicated
    inside the else clause.  This means either extending field_dict to be
    useful in both parseable mode and not, or by creating a "fmt" when in
    parseable mode that is useful when calling the current msg() calls.

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

Reply via email to