Skip to content

Commit

Permalink
move usb/dfu imports into cli-call #95
Browse files Browse the repository at this point in the history
  • Loading branch information
daringer committed Sep 15, 2021
1 parent 7ece0e0 commit 218b45f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pynitrokey/cli/pro.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import click
import nkdfu
import logging
import nkdfu.dfu as dfu
import intelhex as ih
import usb1

from pynitrokey.helpers import local_print
from pynitrokey.libnk import NitrokeyPro, DeviceNotFound
Expand Down Expand Up @@ -68,6 +66,9 @@ def update(firmware_path: str):
FIRMWARE_PATH: A path to the firmware file. File name should end with .bin.
"""
import nkdfu.dfu as dfu
import usb1

print = local_print
# TODO(szszsz): extract logic to nkdfu, leaving only end-user error handling
assert firmware_path.endswith('bin')
Expand Down

0 comments on commit 218b45f

Please sign in to comment.