def set_cups_cupc(self, cups, cupc): sqlutils = AXLSQLUtils(self.__configname__) if cupc and not cups: raise exceptions.PyAXLException('If cupc is true, cups must also be true') rcups, rcupc, pkid = self._get_cups_cupc() if rcups is None and cups: sqlutils.insert_cups(self._uuid, cupc) elif rcups and not cups: sqlutils.remove_cups(self._uuid) elif rcups and cups: sqlutils.update_cups(self._uuid, cupc)