Fix period finding and failures
This commit is contained in:
parent
13e93b89d4
commit
dba6965294
|
@ -243,8 +243,11 @@ seed_config() {
|
||||||
is_match="$(
|
is_match="$(
|
||||||
python <<EOF
|
python <<EOF
|
||||||
from re import sub
|
from re import sub
|
||||||
b_size = float(sub(r'\D','','${b_size}'))
|
try:
|
||||||
t_size = float(sub(r'\D','','${size}'))
|
b_size = float(sub(r'\D.','','${b_size}'))
|
||||||
|
t_size = float(sub(r'\D.','','${size}'))
|
||||||
|
except ValueError:
|
||||||
|
exit(0)
|
||||||
plustwopct = t_size * 1.02
|
plustwopct = t_size * 1.02
|
||||||
minustwopct = t_size * 0.98
|
minustwopct = t_size * 0.98
|
||||||
if b_size > minustwopct and b_size < plustwopct:
|
if b_size > minustwopct and b_size < plustwopct:
|
||||||
|
|
Loading…
Reference in New Issue