Skip to content

Avoid crash >4 channels in power supply

Silvio Donato requested to merge sdonato/gipht:AvoidCrashManyChannels into master

When >4 power supply channels are defined, GITPHT crashes at the startup with:

Traceback (most recent call last):
  File "/home/thermal/GIPHT/oct23_2/gipht/Dialog/Monitor.py", line 98, in run
    self.canvas.updateCanvas()
  File "/home/thermal/GIPHT/oct23_2/gipht/Dialog/Monitor.py", line 141, in updateCanvas
    self.axL.plot(self.x[index], values, color = 'b', linewidth = 0.8, linestyle = styleList[index], marker = '.', markersize = 3)
IndexError: list index out of range

This trivial fix solves the problem.

Merge request reports