1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-06 05:12:21 +01:00

Fix some lint errors in pylint 2.10.2 (#2226)

This commit is contained in:
Jesse Hills
2021-08-31 14:00:58 +12:00
committed by GitHub
parent 140ef791aa
commit 54337befc2
6 changed files with 18 additions and 14 deletions

View File

@@ -836,10 +836,11 @@ pressure = float_with_unit("pressure", "(bar|Bar)", optional_unit=True)
def temperature(value):
err = None
try:
return _temperature_c(value)
except Invalid as orig_err: # noqa
pass
except Invalid as orig_err:
err = orig_err
try:
kelvin = _temperature_k(value)
@@ -853,7 +854,7 @@ def temperature(value):
except Invalid:
pass
raise orig_err # noqa
raise err
_color_temperature_mireds = float_with_unit("Color Temperature", r"(mireds|Mireds)")