Skip to content

Commit 88358c0

Browse files
authored
Merge pull request #97 from flavio-fernandes/get_local_time.exception.merge
get_local_time is expected to raise RuntimeError when it fails
2 parents 2ac9269 + 8226ab4 commit 88358c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_pyportal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,7 @@ def get_local_time(self, location=None):
722722
try:
723723
response = requests.get(api_url, timeout=10)
724724
if response.status_code != 200:
725-
raise ValueError(response.text)
725+
raise RuntimeError(response.text)
726726
if self._debug:
727727
print("Time request: ", api_url)
728728
print("Time reply: ", response.text)

0 commit comments

Comments
 (0)