Fix period finding and failures

This commit is contained in:
Joshua Boniface 2021-12-19 20:55:19 -05:00
parent 559513e629
commit 7dfea80d2d
1 changed files with 5 additions and 2 deletions

View File

@ -243,8 +243,11 @@ seed_config() {
is_match="$(
python <<EOF
from re import sub
b_size = float(sub(r'\D','','${b_size}'))
t_size = float(sub(r'\D','','${size}'))
try:
b_size = float(sub(r'\D.','','${b_size}'))
t_size = float(sub(r'\D.','','${size}'))
except ValueError:
exit(0)
plustwopct = t_size * 1.02
minustwopct = t_size * 0.98
if b_size > minustwopct and b_size < plustwopct: