• 
      

    Fix the API resource registry to prevent some error conditions.

    Review Request #9674 — Created Feb. 18, 2018 and submitted — Latest diff uploaded

    Information

    Djblets
    release-1.0.x
    cf67605...

    Reviewers

    ResourcesRegistry was erroring out during API doc building in Review
    Board due to Sphinx's function inspection in autodoc. It was trying to
    do a getattr() of __get__, __set__, and other similar methods,
    which was turning into resource module lookups. That clearly failed, and
    the errors bubbled up and became warnings during doc building. This has
    been fixed to immediately call the parent method if encountering such a
    function.

    It also had a scoping issue with errors from an exception in Python 3.
    There was an assumption that later code could get access to the
    exception from a previous except .. as e block, but that's not the
    case in Python 3. We now set a properly-scoped variable to the last
    exception for later logging.

    No longer saw errors during doc building.

    Tested that the error messages were including the right exception
    information on Python 2.7 and 3.