Silan error: list index out of range

cosmetic bug fix to prevent so much logging
This commit is contained in:
Martin Konecny 2013-04-05 14:20:34 -04:00
parent cdb53048c7
commit afb55c7b51
1 changed files with 3 additions and 2 deletions

View File

@ -47,6 +47,7 @@ class SilanAnalyzer(Thread):
proc = subprocess.Popen(command, stdout=subprocess.PIPE) proc = subprocess.Popen(command, stdout=subprocess.PIPE)
out = proc.communicate()[0].strip('\r\n') out = proc.communicate()[0].strip('\r\n')
info = json.loads(out) info = json.loads(out)
if len(info['sound']) >= 2:
data['cuein'] = str('{0:f}'.format(info['sound'][0][0])) data['cuein'] = str('{0:f}'.format(info['sound'][0][0]))
data['cueout'] = str('{0:f}'.format(info['sound'][-1][1])) data['cueout'] = str('{0:f}'.format(info['sound'][-1][1]))
except Exception, e: except Exception, e: