More cleanup
This commit is contained in:
parent
692f1ae346
commit
2654c67a84
2 changed files with 13 additions and 13 deletions
|
|
@ -231,12 +231,12 @@ def stop_playing():
|
||||||
audio.stop()
|
audio.stop()
|
||||||
|
|
||||||
def almost_NY():
|
def almost_NY():
|
||||||
t = rtc.datetime
|
now = rtc.datetime
|
||||||
return (t.tm_mday == 31 and
|
return (now.tm_mday == 31 and
|
||||||
t.tm_mon == 12 and
|
now.tm_mon == 12 and
|
||||||
t.tm_hour == 23 and
|
now.tm_hour == 23 and
|
||||||
t.tm_min == 59 and
|
now.tm_min == 59 and
|
||||||
t.tm_sec == 50)
|
now.tm_sec == 50)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ Licensed under the MIT license.
|
||||||
All text above must be included in any redistribution.
|
All text above must be included in any redistribution.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# pylint: disable=global-statement,stop-iteration-return,no-self-use
|
# pylint: disable=global-statement,stop-iteration-return,no-self-use,useless-super-delegation
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
|
@ -303,12 +303,12 @@ class WaitingState(State):
|
||||||
State.exit(self, machine)
|
State.exit(self, machine)
|
||||||
|
|
||||||
def almost_NY(self):
|
def almost_NY(self):
|
||||||
t = rtc.datetime
|
now = rtc.datetime
|
||||||
return (t.tm_mday == 31 and
|
return (now.tm_mday == 31 and
|
||||||
t.tm_mon == 12 and
|
now.tm_mon == 12 and
|
||||||
t.tm_hour == 23 and
|
now.tm_hour == 23 and
|
||||||
t.tm_min == 59 and
|
now.tm_min == 59 and
|
||||||
t.tm_sec == 50)
|
now.tm_sec == 50)
|
||||||
|
|
||||||
def update(self, machine):
|
def update(self, machine):
|
||||||
# No super call to check for switch press to pause
|
# No super call to check for switch press to pause
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue