def __hts_vote(self, valid_person, vote, votebox): import vote_analyzer ik = valid_person[0] evlog.log_integrity(vote_analyzer.analyze(ik, vote, votebox)) res_ok, res = self.__hes.hts_vote(valid_person, vote) if res_ok == evcommon.EVOTE_OK: return protocol.msg_ok(res) else: return self.__return_error(res_ok, res)
def __hts_vote(self, valid_person, vote, votebox): if self.__use_ctx: sess_ok, sess_msg = self.ctx().check_session(client_cert()) if not sess_ok == evcommon.EVOTE_OK: return self.__return_error(sess_ok, sess_msg) import vote_analyzer ik = valid_person[0] evlog.log_integrity(vote_analyzer.analyze(ik, vote, votebox)) res_ok, res = self.__hes.hts_vote(valid_person, vote) if res_ok == evcommon.EVOTE_OK: if self.__use_ctx: self.ctx().kill() return protocol.msg_ok(res) else: return self.__return_error(res_ok, res)