In particular, when an audio selector node has Amp-In caps: N/A, it
allows to still interact with the selector, and not have TypeError traceback
throwns because of NoneType variables.
Reported-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
frame.set_border_width(4)
vbox = gtk.VBox(False, 0)
if caps:
- str = 'Offset: %d\n' % caps.ofs
- str += 'Number of steps: %d\n' % caps.nsteps
- str += 'Step size: %d\n' % caps.stepsize
+ if caps.ofs != None:
+ str = 'Offset: %d\n' % caps.ofs
+ str += 'Number of steps: %d\n' % caps.nsteps
+ str += 'Step size: %d\n' % caps.stepsize
str += 'Mute: %s\n' % (caps.mute and "True" or "False")
vbox.pack_start(self.__new_text_view(text=str), True, True, 0)
idx = 0