mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-30 15:19:40 +03:00
plug.py: Use x if x else y
not or
, & small type cleanup
This commit is contained in:
parent
3f91e57c7c
commit
6b9ec285fd
4
plug.py
4
plug.py
@ -407,7 +407,7 @@ def notify_capidata(
|
|||||||
|
|
||||||
def notify_capi_fleetcarrierdata(
|
def notify_capi_fleetcarrierdata(
|
||||||
data: companion.CAPIData
|
data: companion.CAPIData
|
||||||
) -> Optional[str]:
|
) -> str | None:
|
||||||
"""
|
"""
|
||||||
Send the latest CAPI Fleetcarrier data from the FD servers to each plugin.
|
Send the latest CAPI Fleetcarrier data from the FD servers to each plugin.
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ def notify_capi_fleetcarrierdata(
|
|||||||
try:
|
try:
|
||||||
# Pass a copy of the CAPIData in case the callee modifies it
|
# Pass a copy of the CAPIData in case the callee modifies it
|
||||||
newerror = fc_callback(copy.deepcopy(data))
|
newerror = fc_callback(copy.deepcopy(data))
|
||||||
error = error or newerror
|
error = error if error else newerror
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception(f'Plugin "{plugin.name}" failed on receiving Fleetcarrier data')
|
logger.exception(f'Plugin "{plugin.name}" failed on receiving Fleetcarrier data')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user