Skip to content

Commit

Permalink
No longer throw exception when fetching Mac addresses (#253)
Browse files Browse the repository at this point in the history
* Bump version

* fix: revert accidental change

Revert accidental change in #190 that is causing NebraLtd/hm-pktfwd#140 and NebraLtd/hm-diag#557

Co-authored-by: Aaron Shaw <[email protected]>
  • Loading branch information
robputt and shawaj authored Apr 24, 2023
1 parent 9a39370 commit c8ff479
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions hm_pyhelper/miner_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
SPIUnavailableException, ECCMalfunctionException, \
GatewayMFRFileNotFoundException, \
MinerFailedToFetchMacAddress, GatewayMFRExecutionException, GatewayMFRInvalidVersion, \
UnsupportedGatewayMfrVersion
UnsupportedGatewayMfrVersion, MinerFailedToFetchEthernetAddress
from hm_pyhelper.hardware_definitions import get_variant_attribute, \
UnknownVariantException, UnknownVariantAttributeException

Expand Down Expand Up @@ -321,10 +321,13 @@ def get_ethernet_addresses(diagnostics):
for (path, key) in zip(path_to_files, keys):
try:
diagnostics[key] = get_mac_address(path)
except MinerFailedToFetchMacAddress as e:
diagnostics[key] = False
LOGGER.error(e)
except Exception as e:
diagnostics[key] = False
LOGGER.error(e)
raise MinerFailedToFetchMacAddress(str(e))
raise MinerFailedToFetchEthernetAddress(str(e))


def get_mac_address(path):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

setup(
name='hm_pyhelper',
version='0.14.8',
version='0.14.9',
author="Nebra Ltd",
author_email="[email protected]",
description="Helium Python Helper",
Expand Down

0 comments on commit c8ff479

Please sign in to comment.