Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def print_change(op, old_val, new_val):
if (op == sr.SR_OP_CREATED):
print ("CREATED: ",end='')
print (new_val.to_string(),end='')
elif (op == sr.SR_OP_DELETED):
print ("DELETED: ",end='')
print (old_val.to_string(),end='')
elif (op == sr.SR_OP_MODIFIED):
print ("MODIFIED: ",end='')
print ("old value",end='')
print (old_val.to_string(),end='')
print ("new value",end='')
print (new_val.to_string(),end='')
elif (op == sr.SR_OP_MOVED):
print ("MOVED: " + new_val.xpath() + " after " + old_val.xpath())