Page MenuHomeSoftware Heritage

api: refactor the SWHRemoteAPI's exception class handling
ClosedPublic

Authored by douardda on Mar 18 2019, 10:55 AM.

Details

Summary
  • add a default implementation of the exception class
  • make the exception class a class attribute of SWHRemoteAPI that can be overloaded at instanciation time by the api_exception named argument
  • so the api_exception positional argument of SWHRemoteAPI becomes a named argument
WARNING: This later point does break compatibility for any use of this class not using named arguments when instanciating it. Fortunately, as far as I know, every swh packages does use named argument when instanciating this class, so this should not break anything.

Diff Detail

Repository
rDCORE Foundations and core functionalities
Branch
remote-api
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 4701
Build 6262: tox-on-jenkinsJenkins
Build 6261: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 18 2019, 1:59 PM
This revision was automatically updated to reflect the committed changes.