mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-18 16:03:02 +03:00
eddn-report: str.startswith()
doesn't do regex
I brainfarted, slinging a `.+` into this to generalise it, when the code is using `str.startswith()`, not a regex match. So, use two tests, `.startswith()` for the static portion, then a `.find()` for the remainder after the variant part.
This commit is contained in:
parent
47532262c9
commit
749d1aad3e
@ -77,8 +77,10 @@ def process_file(input_file: str) -> None:
|
||||
# https://github.com/EDDiscovery/EDDiscovery/releases/latest
|
||||
if software_version >= semantic_version.Version.coerce('15.1.1.0'):
|
||||
if matches.group('schema_ref') == 'https://eddn.edcd.io/schemas/outfitting/2':
|
||||
if matches.group('err_msg').startswith(
|
||||
'Failed Validation "[<ValidationError: "u\'\\\\u0131nt_.+\' does not match \'(^Hpt_|^hpt_|^Int_|^int_|_Armour_|_armour_)\'">]'
|
||||
err_msg = matches.group('err_msg')
|
||||
if (
|
||||
err_msg.startswith('Failed Validation "[<ValidationError: "u\'\\\\u0131nt_') and
|
||||
err_msg.find('\' does not match \'(^Hpt_|^hpt_|^Int_|^int_|_Armour_|_armour_)\'">]') != -1
|
||||
):
|
||||
# <https://github.com/EDDiscovery/EDDiscovery/issues/3304>
|
||||
pass
|
||||
|
Loading…
x
Reference in New Issue
Block a user