mirror of https://github.com/ARMmbed/mbed-os.git
Remove prints and lint warnings
parent
812812a626
commit
a045c45996
|
@ -92,14 +92,11 @@ class Cache(object):
|
||||||
sectors = [(flash_alg.flash_start + offset, size)
|
sectors = [(flash_alg.flash_start + offset, size)
|
||||||
for offset, size in flash_alg.sector_sizes]
|
for offset, size in flash_alg.sector_sizes]
|
||||||
ret.extend(sectors)
|
ret.extend(sectors)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
print(e)
|
|
||||||
print(device)
|
|
||||||
pass
|
pass
|
||||||
ret.sort(key=lambda sector: sector[0])
|
ret.sort(key=lambda sector: sector[0])
|
||||||
return ret
|
return ret
|
||||||
except Exception as e:
|
except Exception:
|
||||||
print(e)
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -119,11 +116,13 @@ class Cache(object):
|
||||||
def get_svd_file(self, device_name):
|
def get_svd_file(self, device_name):
|
||||||
"""Retrieve the flash algorithm file for a particular part.
|
"""Retrieve the flash algorithm file for a particular part.
|
||||||
|
|
||||||
Assumes that both the PDSC and the PACK file associated with that part are in the cache.
|
Assumes that both the PDSC and the PACK file associated with that part
|
||||||
|
are in the cache.
|
||||||
|
|
||||||
:param device_name: The exact name of a device
|
:param device_name: The exact name of a device
|
||||||
:type device_name: str
|
:type device_name: str
|
||||||
:return: A file-like object that, when read, is the ELF file that describes the flashing algorithm
|
:return: A file-like object that, when read, is the ELF file that
|
||||||
|
describes the flashing algorithm
|
||||||
:rtype: ZipExtFile
|
:rtype: ZipExtFile
|
||||||
"""
|
"""
|
||||||
device = self.index[device_name]
|
device = self.index[device_name]
|
||||||
|
@ -134,4 +133,3 @@ class Cache(object):
|
||||||
with open(LocalPackIndex, "w+") as out:
|
with open(LocalPackIndex, "w+") as out:
|
||||||
self._cache.index["version"] = "0.2.0"
|
self._cache.index["version"] = "0.2.0"
|
||||||
dump(self._cache.index, out, indent=4, sort_keys=True)
|
dump(self._cache.index, out, indent=4, sort_keys=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue