ecc should return None if nothing was decoded

This commit is contained in:
Roman Zeyde
2014-07-19 18:22:49 +03:00
parent c103460e05
commit a3bad593a6

2
ecc.py
View File

@@ -39,7 +39,7 @@ def decode(data, nsym=DEFAULT_NSYM):
log.debug('Decoding stopped: %s', e)
break
if i == 0:
if not dec:
return None
overhead = (i - len(dec)) / float(i)