Merge pull request #345 from coreemu/bugfix/hwaddr-none

updates to log exceptions during threadpool, avoid errors when hwaddr…
This commit is contained in:
bharnden 2020-01-15 14:01:26 -08:00 committed by GitHub
commit ce1ac1fc05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -153,6 +153,7 @@ class CoreInterface:
:param str addr: hardware address to set to. :param str addr: hardware address to set to.
:return: nothing :return: nothing
""" """
if addr is not None:
addr = utils.validate_mac(addr) addr = utils.validate_mac(addr)
self.hwaddr = addr self.hwaddr = addr

View file

@ -440,6 +440,7 @@ def threadpool(
result = future.result() result = future.result()
results.append(result) results.append(result)
except Exception as e: except Exception as e:
logging.exception("thread pool exception")
exceptions.append(e) exceptions.append(e)
return results, exceptions return results, exceptions