def cas(key, value, old_value):
 store = load()
 if (key not in store):
  return False
 if (store[key] != old_value):
  return False
 store[key] = value
 dump(store)
 return True

def cas ( key , value , old_value ) : store = load ( ) if ( key not in store ) : return False if ( store [ key ] != old_value ) : return False store [ key ] = value dump ( store ) return True
check and set a value in the minion datastore cli example: .