adafruit / Adafruit_CircuitPython_PyPortal

CircuitPython driver for Adafruit PyPortal.
MIT License
45 stars 56 forks source link

get_local_time is expected to raise RuntimeError when it fails #97

Closed flavio-fernandes closed 3 years ago

flavio-fernandes commented 3 years ago

When response.status_code != 200 from the REST api to TIME_SERVICE the code raises ValueError, which is not what all the examples in Adafruit_Learning_System_Guides handle gracefully. Instead, this situation should be raising the RuntimeError exception.

Fixes https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/issues/96 .