Skip to content

Commit

Permalink
Fixed issue Juniper#391
Browse files Browse the repository at this point in the history
  • Loading branch information
chidanandpujar committed Nov 11, 2021
1 parent e1030a0 commit e6cf6ef
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/jnpr/jsnapy/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2844,19 +2844,19 @@ def _create_message(text):
re.search('-', del_val)):
dvalue = abs(float(delta_val.strip('%')))
mvalue = val1 - ((val1 * dvalue) / 100)
if (val2 > val1 or val2 < mvalue):
flag_pass = False
else:
if (val2 < val1 and val2 >= mvalue):
flag_pass = True
else:
flag_pass = False

# for positive percent change
elif re.search('%', del_val) and (re.search('\+', del_val)):
dvalue = float(delta_val.strip('%'))
mvalue = val1 + ((val1 * dvalue) / 100)
if (val2 < val1 or val2 > mvalue):
flag_pass = False
else:
if (val2 >= val1 and val2 <= mvalue):
flag_pass = True
else:
flag_pass = False

# absolute percent change
elif re.search('%', del_val):
Expand Down

0 comments on commit e6cf6ef

Please sign in to comment.