[sanlock] 03/05: python: Generalize set_value_error as set_error utility function