HomeSoftware Heritage

api: refactor the SWHRemoteAPI's exception class handling

Description

api: refactor the SWHRemoteAPI's exception class handling

  • 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.

Details

Provenance
douarddaAuthored on Mar 6 2019, 11:52 AM
douarddaPushed on Mar 19 2019, 10:13 AM
Differential Revision
D1261: api: refactor the SWHRemoteAPI's exception class handling
Parents
rDCORE8147cd7f54a6: api: kind of fix for the SWHRemoteAPI's contructor
Branches
Unknown
Tags
Unknown
References
tag: v0.0.56
Build Status
Buildable 4706
Build 6268: test-and-build