Commit 2278009c authored by Peter Jansweijer's avatar Peter Jansweijer

fix case where temperature measurement is None

parent f0c5f958
......@@ -96,7 +96,8 @@ def file_to_dict(filename):
break
# Values of interest on one line are:
# channel, ITU channel, ITU wavelength [nm], crtt [ps], drxm, drxs
# sfp_channel, ITU channel, ITU wavelength, crtt [ps], drxm, drxs,
# fiber-spool-temp, wr-slave-temp
# note that there may be multiple measurment lines (link restarts) for a give set
# of {channel, ITU channel, ITU wavelength}
lst_meas = []
......@@ -115,7 +116,12 @@ def file_to_dict(filename):
existing_temp_list = []
existing_crtt_list.append(float(line_lst[3])) # append the crtt measurement of the current line
existing_temp_list.append(float(line_lst[6])) # append the temperature measurement of the current line
try:
existing_temp_list.append(float(line_lst[6])) # append the temperature measurement of the current line
except:
existing_temp_list.append(0.0) # case temp = None
lst_meas.append(existing_crtt_list) # append the list of all crtt measurments
lst_meas.append(existing_temp_list) # append the list of all temperature measurments
lst_meas.append(int(line_lst[0])) # append sfp module channel number
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment