Skip to content

Commit 46ab21d

Browse files
committed
add max_attempts arg to base.get_local_time()
1 parent a1ed985 commit 46ab21d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

adafruit_portalbase/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,12 @@ def _fill_text_labels(self, values):
484484
self._fetch_set_text(string, index=i)
485485
value_index += 1
486486

487-
def get_local_time(self, location=None):
487+
def get_local_time(self, location=None, max_attempts=10):
488488
"""Accessor function for get_local_time()"""
489489
if self.network is None:
490490
raise RuntimeError("network must not be None to use get_local_time()")
491491

492-
return self.network.get_local_time(location=location)
492+
return self.network.get_local_time(location=location, max_attempts=max_attempts)
493493

494494
def push_to_io(self, feed_key, data, metadata=None, precision=None):
495495
"""Push data to an adafruit.io feed

0 commit comments

Comments
 (0)