1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-06-14 22:32:11 +03:00

Replaced subscript and concat with replace() call

This commit is contained in:
A_D 2020-08-07 14:43:53 +02:00
parent b5d3b89a3c
commit 237e5ce52d
No known key found for this signature in database
GPG Key ID: 4BE9EB7DF45076C4

View File

@ -185,7 +185,10 @@ class EDDN:
else:
# Rewrite old schema name
if msg['$schemaRef'].startswith('http://schemas.elite-markets.net/eddn/'):
msg['$schemaRef'] = 'https://eddn.edcd.io/schemas/' + msg['$schemaRef'][38:] # TODO: 38?!
msg['$schemaRef'] = str(msg['$schemaRef']).replace(
'http://schemas.elite-markets.net/eddn/',
'https://eddn.edcd.io/schemas/'
)
try:
self.send(cmdr, msg)