From: Jaroslav Kysela Date: Mon, 29 Apr 2013 07:09:33 +0000 (+0200) Subject: hda_analyzer: Fix len(None) backtrace X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=f949105872e87825deba126b5aaf8d2193986621;p=alsa.git hda_analyzer: Fix len(None) backtrace From: Frank A Kingswood Signed-off-by: Jaroslav Kysela --- diff --git a/hda-analyzer/hda_codec.py b/hda-analyzer/hda_codec.py index ad9f535..a09dc5e 100644 --- a/hda-analyzer/hda_codec.py +++ b/hda-analyzer/hda_codec.py @@ -316,7 +316,17 @@ class HDAAmpVal: self.indices = 1 self.origin_vals = None if dir == HDA_INPUT: - self.indices = node.wtype_id == 'PIN' and 1 or len(node.connections) + if node.wtype_id == 'PIN': + self.indices = 1 + elif node.connections: + self.indices = len(node.connections) + else: + self.indices = 0 + self.reread() + + def __write_val(self, idx): + + self.reread() def __write_val(self, idx):