1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-16 09:10:35 +03:00

Added warning log messages

This commit is contained in:
A_D 2020-08-07 15:46:46 +02:00
parent 7adf522de9
commit de872cdfa6
No known key found for this signature in database
GPG Key ID: 4BE9EB7DF45076C4

View File

@ -639,18 +639,21 @@ def journal_entry(
# add mandatory StarSystem, StarPos and SystemAddress properties to Scan events
if 'StarSystem' not in entry:
if not system:
logger.warn("system is None, can't add StarSystem")
return "system is None, can't add StarSystem"
entry['StarSystem'] = system
if 'StarPos' not in entry:
if not this.coordinates:
logger.warn("this.coordinates is None, can't add StarPos")
return "this.coordinates is None, can't add StarPos"
entry['StarPos'] = list(this.coordinates)
if 'SystemAddress' not in entry:
if not this.systemaddress:
logger.warn("this.systemaddress is None, can't add SystemAddress")
return "this.systemaddress is None, can't add SystemAddress"
entry['SystemAddress'] = this.systemaddress