mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-25 04:40:53 +03:00
scripts/eddn-report-log-errors: Ensure only 'known' things aren't printed
* Bump EDMC version to 5.3.0 * Use matching *for* known things and `pass`, and ensure there's an "else print" everywhere to catch unknown things.
This commit is contained in:
parent
b38659a6f8
commit
a93c342550
@ -75,7 +75,10 @@ def process_file(input_file: str) -> None:
|
||||
'https://eddn.edcd.io/schemas/outfitting/2',
|
||||
):
|
||||
# Reported via Discord PM to Robby 2022-01-07
|
||||
if matches.group('err_msg') != 'Failed Validation "[<ValidationError: \'[] is too short\'>]"':
|
||||
if matches.group('err_msg') == 'Failed Validation "[<ValidationError: \'[] is too short\'>]"':
|
||||
pass
|
||||
|
||||
else:
|
||||
print(line)
|
||||
|
||||
else:
|
||||
@ -103,7 +106,6 @@ def process_file(input_file: str) -> None:
|
||||
else:
|
||||
print(line)
|
||||
|
||||
|
||||
else:
|
||||
print(line)
|
||||
|
||||
@ -114,10 +116,13 @@ def process_file(input_file: str) -> None:
|
||||
|
||||
elif matches.group('software_name').startswith('E:D Market Connector'):
|
||||
# https://github.com/EDCD/EDMarketConnector/releases/latest
|
||||
if software_version >= semantic_version.Version.coerce('5.2.4'):
|
||||
if software_version >= semantic_version.Version.coerce('5.3.0'):
|
||||
if matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/codexentry/1':
|
||||
# <https://github.com/EDCD/EDMarketConnector/issues/1393>
|
||||
if matches.group('err_msg') != 'Failed Validation "[<ValidationError: "\'\' is too short">]"':
|
||||
if matches.group('err_msg') == 'Failed Validation "[<ValidationError: "\'\' is too short">]"':
|
||||
pass
|
||||
|
||||
else:
|
||||
print(matches.group('err_msg'))
|
||||
print(line)
|
||||
|
||||
@ -142,14 +147,16 @@ def process_file(input_file: str) -> None:
|
||||
# <https://github.com/EDCD/EDMarketConnector/issues/1403>
|
||||
pass
|
||||
|
||||
elif matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/approachsettlement/1':
|
||||
if matches.group('err_msg') == 'Failed Validation "[<ValidationError: "\'MarketID\' is a required property">]"':
|
||||
# <https://github.com/EDCD/EDDN/issues/181>
|
||||
pass
|
||||
else:
|
||||
print(line)
|
||||
|
||||
elif matches.group('err_msg') == 'Failed Validation "[<ValidationError: "\'Latitude\' is a required property">]"':
|
||||
elif matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/approachsettlement/1':
|
||||
if matches.group('err_msg') == 'Failed Validation "[<ValidationError: "\'Latitude\' is a required property">]"':
|
||||
# <https://github.com/EDCD/EDMarketConnector/issues/1476>
|
||||
pass
|
||||
|
||||
else:
|
||||
print(line)
|
||||
|
||||
else:
|
||||
print(line)
|
||||
@ -158,10 +165,15 @@ def process_file(input_file: str) -> None:
|
||||
# <https://edcodex.info/?m=tools&entry=212>
|
||||
if software_version >= semantic_version.Version.coerce('3.7.7888.21039'):
|
||||
if matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/commodity/3':
|
||||
if matches.group('err_msg') == 'Failed Validation "[<ValidationError: "Additional properties are not allowed (\'Proportion\', \'Name\' were unexpected)">]"':
|
||||
# Reported via Frontier forums: <https://forums.frontier.co.uk/threads/elite-g19s-companion-app-with-simulated-space-traffic-control.226782/post-9690204>
|
||||
if matches.group('err_msg') != 'Failed Validation "[<ValidationError: "Additional properties are not allowed (\'Proportion\', \'Name\' were unexpected)">]"':
|
||||
print(matches.group('err_msg'))
|
||||
pass
|
||||
|
||||
else:
|
||||
print(line)
|
||||
|
||||
else:
|
||||
print(line)
|
||||
|
||||
elif matches.group('software_name') == 'EDSM':
|
||||
# It's in-browser, no public source/releases
|
||||
@ -172,8 +184,10 @@ def process_file(input_file: str) -> None:
|
||||
if not matches.group('err_msg').startswith(
|
||||
'Failed Validation "[<ValidationError: "{\'type\': [\'array\', \'boolean\', \'integer\', \'number\', \'null\', \'object\', \'string\']} is not allowed for '
|
||||
):
|
||||
print(matches.group('err_msg'))
|
||||
print(line)
|
||||
pass
|
||||
|
||||
print(matches.group('err_msg'))
|
||||
print(line)
|
||||
|
||||
else:
|
||||
print(line)
|
||||
@ -205,11 +219,13 @@ def process_file(input_file: str) -> None:
|
||||
if matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/journal/1':
|
||||
if matches.group('journal_event') == 'Docked':
|
||||
# <https://discord.com/channels/164411426939600896/205369618284544000/929102478954340372>
|
||||
if not matches.group('err_msg').startswith(
|
||||
if matches.group('err_msg').startswith(
|
||||
'Failed Validation "[<ValidationError: "{\'type\': [\'array\', \'boolean\', \'integer\', \'number\', \'null\', \'object\', \'string\']} is not allowed for '
|
||||
):
|
||||
print(matches.group('err_msg'))
|
||||
print(line)
|
||||
pass
|
||||
|
||||
print(matches.group('err_msg'))
|
||||
print(line)
|
||||
|
||||
else:
|
||||
print(line)
|
||||
|
Loading…
x
Reference in New Issue
Block a user