def _unlock(self, name, client_id, request_id):
if name in self._locks:<EOL><INDENT>other_client_id, other_request_id, lock_time = self._locks[name]<EOL>if other_client_id != client_id:<EOL><INDENT>response = (self.RELEASE_ERROR + self.DELIMITER +<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % (name,<EOL>other_client_id,<EOL>other_request_id,<EOL>client_id,<EOL>request_id))<EOL>self._logger.error(response)<EOL>return response<EOL><DEDENT>else:<EOL><INDENT>del self._locks[name]<EOL>return self.RELEASED<EOL><DEDENT><DEDENT>elif (name, client_id) in self._timeout_locks:<EOL><INDENT>other_request_id, lock_time = self._timeout_locks[(name, client_id)]<EOL>timeout = time.time() - lock_time - self._timeout<EOL>response = (self.RELEASE_ERROR + self.DELIMITER +<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % (name, timeout, client_id, other_request_id))<EOL>return response<EOL><DEDENT>else:<EOL><INDENT>response = (self.RELEASE_ERROR + self.DELIMITER +<EOL>'<STR_LIT>'<EOL>'<STR_LIT>' % (name, client_id, request_id))<EOL>self._logger.warning(response)<EOL>return response<EOL><DEDENT>
Handles unlocking