From db6e7dd961896422039edcbd0eb4dcde06e36097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Inge=20Hanssen?= Date: Thu, 24 Oct 2019 11:24:12 +0200 Subject: [PATCH] Add missing import Cleanup --- nordicsemi/lister/windows/structures.py | 6 ++++-- tests/bdd/steps/dfu_steps.py | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nordicsemi/lister/windows/structures.py b/nordicsemi/lister/windows/structures.py index b8acd0a..7a28615 100644 --- a/nordicsemi/lister/windows/structures.py +++ b/nordicsemi/lister/windows/structures.py @@ -58,6 +58,7 @@ def __str__(self): def __repr__(self): return "".format(str(self)) + assert ctypes.sizeof(_GUID) == 16 @@ -118,14 +119,15 @@ def __init__(self): super(ctypes.Structure, self).__init__() self.cbSize = ctypes.sizeof(self) + class ctypesInternalGUID: def __init__(self, bytes): self._internal = bytes - def __str__(self): - return self._internal.raw + def __bytes__(self): return self._internal.raw + DeviceInfoData.size = DeviceInfoData.cbSize DeviceInfoData.dev_inst = DeviceInfoData.DevInst DeviceInfoData.class_guid = DeviceInfoData.ClassGuid diff --git a/tests/bdd/steps/dfu_steps.py b/tests/bdd/steps/dfu_steps.py index 25bf563..054277a 100644 --- a/tests/bdd/steps/dfu_steps.py +++ b/tests/bdd/steps/dfu_steps.py @@ -38,6 +38,7 @@ import logging import os import subprocess +import time from click.testing import CliRunner from behave import then, given