Fix period finding and failures
This commit is contained in:
parent
559513e629
commit
7dfea80d2d
|
@ -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