Fix period finding and failures

This commit is contained in:
Joshua Boniface 2023-09-01 15:41:59 -04:00
parent 13e93b89d4
commit dba6965294
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: