8000 dict_view types corrections for micropython · mamarais/lib-python@b9822e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit b9822e7

Browse files
author
amorozenko
committed
dict_view types corrections for micropython
1 parent cf2ef6f commit b9822e7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

blynktimer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ def register(blynk, *args, interval=DEFAULT_INTERVAL, run_once=False, **kwargs):
3434
class Deco(object):
3535
def __init__(self, func):
3636
self.func = func
37-
if len(Timer.timers.keys()) >= MAX_TIMERS:
37+
if len(list(Timer.timers.keys())) >= MAX_TIMERS:
3838
raise TimerError('Max allowed timers num={}'.format(MAX_TIMERS))
3939
_timer = _Timer(interval, func, run_once, *args, **kwargs)
40-
Timer.timers['{}_{}'.format(len(Timer.timers.keys()), blynk._get_func_name(func))] = _timer
40+
Timer.timers['{}_{}'.format(len(list(Timer.timers.keys())), blynk._get_func_name(func))] = _timer
4141

4242
def __call__(self, *f_args, **f_kwargs):
4343
return self.func(*f_args, **f_kwargs)

0 commit comments

Comments
 (0)
0