Don't use dict union operator (requires Python 3.9).

This commit is contained in:
Dain Nilsson 2022-05-13 09:03:13 +02:00
parent 5caa197911
commit 50355d241e
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -285,8 +285,9 @@ class UsbDeviceNode(AbstractDeviceNode):
class ReaderDeviceNode(AbstractDeviceNode):
def get_data(self):
try:
return super().get_data() | dict(present=True)
return {**super().get_data(), "present": True}
except Exception:
logger.debug("Couldn't get NFC device info, present=False", exc_info=True)
return dict(present=False)
@child