Skip to content

Commit 9fb16dd

Browse files
committed
add requested changes
1 parent 288e6e0 commit 9fb16dd

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

PyPortal_Wakeup_Light/wake_up_light.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
default_wake_up)
3030
days_str = ("Mon.", "Tues.", "Wed.", "Thurs.", "Fri.", "Sat.", "Sun.")
3131

32-
# Bool varible for handing errors when getting time from internet
33-
time_true = True
34-
3532
# set neopixel min and max brightness
3633
BRIGHTNESS = 0
3734
MIN_BRIGHTNESS = 0
@@ -87,15 +84,14 @@
8784
pyportal.splash.append(wakeup_time_textarea)
8885
pyportal.splash.append(light_on_time_textarea)
8986

90-
while time_true:
87+
while True:
9188
try:
9289
print("Getting time from internet!")
9390
pyportal.get_local_time()
9491
except RuntimeError as e:
9592
print("Some error occured, retrying! -", e)
96-
time_true = True
9793
continue
98-
time_true = False
94+
break
9995

10096
# parse given time string into hour minute and AM_PM elements
10197
def parseTime(time_before):

0 commit comments

Comments
 (0)