mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
move 'chunks' to trezor.utils
This commit is contained in:
parent
6c0970df9e
commit
6553d315e6
@ -6,11 +6,7 @@ import unittest
|
||||
from trezor import loop
|
||||
from trezor import msg
|
||||
from trezor.wire import read_wire_msg, write_wire_msg
|
||||
|
||||
|
||||
def chunks(l, n):
|
||||
for i in range(0, len(l), n):
|
||||
yield l[i:i + n]
|
||||
from trezor.utils import chunks
|
||||
|
||||
|
||||
class TestWire(unittest.TestCase):
|
||||
|
@ -29,3 +29,7 @@ def unimport_gen(gen):
|
||||
del sys.modules[to_remove]
|
||||
return ret
|
||||
return inner
|
||||
|
||||
def chunks(l, n):
|
||||
for i in range(0, len(l), n):
|
||||
yield l[i:i + n]
|
||||
|
Loading…
Reference in New Issue
Block a user