[Bugfix] invlist is already inventory object!
This commit is contained in:
parent
c7d8569105
commit
2bab42a0dc
@ -587,10 +587,9 @@ def restitute_trace(input_tuple):
|
|||||||
elif invtype == 'xml':
|
elif invtype == 'xml':
|
||||||
invlist = inobj
|
invlist = inobj
|
||||||
if len(invlist) > 1:
|
if len(invlist) > 1:
|
||||||
finv = find_in_list(invlist, seed_id)
|
inventory = find_in_list(invlist, seed_id)
|
||||||
else:
|
else:
|
||||||
finv = invlist[0]
|
inventory = invlist[0]
|
||||||
inventory = read_inventory(finv, format='STATIONXML')
|
|
||||||
elif invtype is None:
|
elif invtype is None:
|
||||||
return no_metadata(tr, seed_id)
|
return no_metadata(tr, seed_id)
|
||||||
else:
|
else:
|
||||||
@ -608,9 +607,14 @@ def restitute_trace(input_tuple):
|
|||||||
print(vmsg)
|
print(vmsg)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
tr.attach_response(inventory)
|
try:
|
||||||
tr.remove_response(output=unit,
|
tr.attach_response(inventory)
|
||||||
pre_filt=prefilt)
|
tr.remove_response(output=unit,
|
||||||
|
pre_filt=prefilt)
|
||||||
|
except UnboundLocalError as e:
|
||||||
|
vmsg = '{0}'.format(e)
|
||||||
|
print(vmsg)
|
||||||
|
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
msg0 = 'Response for {0} not found in Parser'.format(seed_id)
|
msg0 = 'Response for {0} not found in Parser'.format(seed_id)
|
||||||
msg1 = 'evalresp failed to calculate response'
|
msg1 = 'evalresp failed to calculate response'
|
||||||
|
Loading…
Reference in New Issue
Block a user