URL: https://github.com/freeipa/freeipa/pull/681 Title: #681: Fix ipadiscovery
tiran commented: """ You can simplify your code a lot with the operator module and sorted(key) trick: https://docs.python.org/3/library/operator.html#operator.attrgetter https://docs.python.org/3/library/functions.html#sorted ``` import operator ``` ``` answers = resolver.query(qname, rdatatype.SRV) answers = sorted(answer, key=operator.attrgetter('priority')) ``` Please squash your changes into one commit. """ See the full comment at https://github.com/freeipa/freeipa/pull/681#issuecomment-291045102
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code