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:
parent
3f91e57c7c
commit
6b9ec285fd
4
plug.py
4
plug.py
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user