1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-12 23:37:14 +03:00

plug.py: Use x if x else y not or , & small type cleanup

This commit is contained in:
Athanasius 2022-12-30 16:43:58 +00:00
parent 3f91e57c7c
commit 6b9ec285fd
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -407,7 +407,7 @@ def notify_capidata(
def notify_capi_fleetcarrierdata(
data: companion.CAPIData
) -> Optional[str]:
) -> str | None:
"""
Send the latest CAPI Fleetcarrier data from the FD servers to each plugin.
@ -421,7 +421,7 @@ def notify_capi_fleetcarrierdata(
try:
# Pass a copy of the CAPIData in case the callee modifies it
newerror = fc_callback(copy.deepcopy(data))
error = error or newerror
error = error if error else newerror
except Exception:
logger.exception(f'Plugin "{plugin.name}" failed on receiving Fleetcarrier data')