Skip to content
  • Markus Armbruster's avatar
    c375f05e
    sphinx/qapidoc: Tidy up pylint warning raise-missing-from · c375f05e
    Markus Armbruster authored
    
    
    Pylint advises:
    
        docs/sphinx/qapidoc.py:518:12: W0707: Consider explicitly re-raising using 'raise ExtensionError(str(err)) from err' (raise-missing-from)
    
    >From its manual:
    
        Python's exception chaining shows the traceback of the current
        exception, but also of the original exception.  When you raise a
        new exception after another exception was caught it's likely that
        the second exception is a friendly re-wrapping of the first
        exception.  In such cases `raise from` provides a better link
        between the two tracebacks in the final error.
    
    Makes sense, so do it.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-ID: <20231025092159.1782638-2-armbru@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
    c375f05e
    sphinx/qapidoc: Tidy up pylint warning raise-missing-from
    Markus Armbruster authored
    
    
    Pylint advises:
    
        docs/sphinx/qapidoc.py:518:12: W0707: Consider explicitly re-raising using 'raise ExtensionError(str(err)) from err' (raise-missing-from)
    
    >From its manual:
    
        Python's exception chaining shows the traceback of the current
        exception, but also of the original exception.  When you raise a
        new exception after another exception was caught it's likely that
        the second exception is a friendly re-wrapping of the first
        exception.  In such cases `raise from` provides a better link
        between the two tracebacks in the final error.
    
    Makes sense, so do it.
    
    Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
    Message-ID: <20231025092159.1782638-2-armbru@redhat.com>
    Reviewed-by: default avatarJohn Snow <jsnow@redhat.com>
Loading