palazzem / econnect-python

API adapter used to control programmatically an Elmo alarm system
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

[core/client] leverage requests raise_for_status() instead of internal exceptions handling #39

Closed palazzem closed 4 years ago

palazzem commented 4 years ago

Overview

Closes #37

Leverages requests Response.raise_for_status() call, so that it's not needed anymore to check the result and raise an internal exception. This removes all the duplication about error handling, and every ElmoClient method does only what it needs.

codecov-io commented 4 years ago

Codecov Report

Merging #39 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #39   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines         195    180   -15     
=====================================
- Hits          195    180   -15
Impacted Files Coverage Δ
elmo/api/client.py 100% <100%> (ø) :arrow_up:
elmo/api/exceptions.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update aa3bbf1...f5cc201. Read the comment docs.