mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-06-09 20:02:11 +03:00
eddn: Be paranoid about this.status_body_name type and value
As it was we'd blindly set codexentry['BodyName'] from it if not None.
This commit is contained in:
parent
4fa64eec40
commit
2bf70aae14
@ -943,7 +943,11 @@ class EDDN:
|
|||||||
entry = ret
|
entry = ret
|
||||||
|
|
||||||
# Set BodyName if it's available from Status.json
|
# Set BodyName if it's available from Status.json
|
||||||
if this.status_body_name is not None:
|
if this.status_body_name is None or not isinstance(this.status_body_name, str):
|
||||||
|
logger.warning(f'this.status_body_name was not set properly:'
|
||||||
|
f' "{this.status_body_name}" ({type(this.status_body_name)})')
|
||||||
|
|
||||||
|
else:
|
||||||
entry['BodyName'] = this.status_body_name
|
entry['BodyName'] = this.status_body_name
|
||||||
# Only set BodyID if journal BodyName matches the Status.json one.
|
# Only set BodyID if journal BodyName matches the Status.json one.
|
||||||
# This avoids binary body issues.
|
# This avoids binary body issues.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user