CompoundFilter, ArrayFilter: fix bug #1

This commit is contained in:
DeepSOIC 2016-01-28 22:29:06 +03:00
parent b3b0ace108
commit 4904578dfd
2 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,8 @@ class _CompoundFilter:
rst.append(shps[i])
flags[i] = True
elif len(r_v) == 2 or len(r_v) == 3:
if len(r_v) == 2:
r_v.append("") # fix issue #1: instead of checking length here and there, simply add the missing field =)
ifrom = None if len(r_v[0].strip()) == 0 else int(r_v[0])
ito = None if len(r_v[1].strip()) == 0 else int(r_v[1])
istep = None if len(r_v[2].strip()) == 0 else int(r_v[2])

View File

@ -91,6 +91,8 @@ class LatticeArrayFilter(lattice2BaseFeature.LatticeFeature):
output.append(input[i])
flags[i] = True
elif len(r_v) == 2 or len(r_v) == 3:
if len(r_v) == 2:
r_v.append("") # fix issue #1: instead of checking length here and there, simply add the missing field =)
ifrom = None if len(r_v[0].strip()) == 0 else int(r_v[0])
ito = None if len(r_v[1].strip()) == 0 else int(r_v[1])
istep = None if len(r_v[2].strip()) == 0 else int(r_v[2])