Replaced subscript and concat with replace() call

This commit is contained in:
A_D committed 2020-08-07 14:43:53 +02:00
1 parent b5d3b89a3c
commit 237e5ce52d
1 file changed
+4 -1
+4 -1
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)