MCPcopy Create free account
hub / github.com/ARMmbed/DAPLink / ReleaseFirmwareBundle

Class ReleaseFirmwareBundle

test/bundle.py:72–102  ·  view source on GitHub ↗

Class to abstract access a formal build as a bundle

Source from the content-addressed store, hash-verified

70
71
72class ReleaseFirmwareBundle(FirmwareBundle):
73 """Class to abstract access a formal build as a bundle"""
74
75 def __init__(self, directory):
76 bundle_contents = os.listdir(directory)
77 firmware_list = []
78 for name in bundle_contents:
79 path = directory + os.sep + name
80 if os.path.isdir(path):
81 daplink_firmware = DAPLinkFirmware(name, self, path)
82 if daplink_firmware.valid:
83 firmware_list.append(daplink_firmware)
84 elif os.path.isfile(path):
85 if ('.hex' in name):
86 daplink_firmware = ReleaseFirmware(name, self, path)
87 if daplink_firmware.valid:
88 firmware_list.append(daplink_firmware)
89 else:
90 assert False
91 self._firmware_list = firmware_list
92
93 def get_firmware_list(self):
94 return self._firmware_list
95
96 @property
97 def build_sha(self):
98 raise NotImplementedError()
99
100 @property
101 def build_local_mods(self):
102 raise NotImplementedError()
103
104
105class ProjectFirmwareBundle(FirmwareBundle):

Callers 1

load_bundle_from_releaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected