mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-15 03:53:41 +02:00
fix: Special case were no replica separator is specified accounted for
This commit is contained in:
parent
c5c82dae21
commit
d772e09d50
1 changed files with 4 additions and 3 deletions
|
@ -309,8 +309,9 @@ def import_json_string(json_string, verbose=True, full_output=False):
|
||||||
for rep in ens['replica']:
|
for rep in ens['replica']:
|
||||||
rep_name = rep['name']
|
rep_name = rep['name']
|
||||||
if len(rep_name) > len(ens["id"]):
|
if len(rep_name) > len(ens["id"]):
|
||||||
|
if rep_name[len(ens["id"])] != "|":
|
||||||
tmp_list = list(rep_name)
|
tmp_list = list(rep_name)
|
||||||
tmp_list[len(ens["id"])] = "|"
|
tmp_list = tmp_list[:len(ens["id"])] + ["|"] + tmp_list[len(ens["id"]):]
|
||||||
rep_name = ''.join(tmp_list)
|
rep_name = ''.join(tmp_list)
|
||||||
retd['names'].append(rep_name)
|
retd['names'].append(rep_name)
|
||||||
retd['idl'].append([di[0] for di in rep['deltas']])
|
retd['idl'].append([di[0] for di in rep['deltas']])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue