Return an inactive message.
508945
def inactive_response(self, request):
        
        inactive_url = getattr(settings, 'LOGIN_INACTIVE_REDIRECT_URL', '')
        if inactive_url:
            return HttpResponseRedirect(inactive_url)
        else:
            return self.error_to_response(request, {'error': _("This user account is marked as inactive.")})
478014
def quit(self, message=None):
        """"""
        if message is None:
            message = 'Quit'

        if self.connected:
            self.send('QUIT', params=[message])
171879
def message(self, message, thread_id=None):
        
        return_value = helpers.Messager(self._session).send(
            self.username, message, self.authcode, thread_id
        )
        self.refresh(reload=False)
        return return_value
29238
public static String checkNotEmpty(String str, String message) {
        if (checkNotNull(str).isEmpty()) {
            throw new IllegalArgumentException(message);
        }
        return str;
    }
914182
def _getMessage(session, txid):
    """"""

    while True:
        if txid in session.messages:
            msg = session.messages[txid]
            del session.messages[txid]
            return msg
        else:
            try:
                # apparently any timeout at all allows the thread to be
                # stopped but none make it unstoppable with ctrl+c
                nextMessage = session.queue.get(timeout=100)
            except queue.Empty:
                continue
            if 'txid' in nextMessage:
                session.messages[nextMessage['txid']] = nextMessage
            else:
                logger.info("message with no txid: %s" % nextMessage)
806712
def send(self, fail_silently=False):
        """"""
        if not self.recipients():
            # Don't bother creating the network connection if
            # there's nobody to send to.
            return 0
        return self.get_connection(fail_silently).send_messages([self])
1167814
async def on_raw_away(self, message):
        
        if 'away-notify' not in self._capabilities or not self._capabilities['away-notify']:
            return

        nick, metadata = self._parse_user(message.source)
        if nick not in self.users:
            return

        self._sync_user(nick, metadata)
        self.users[nick]['away'] = len(message.params) > 0
        self.users[nick]['away_message'] = message.params[0] if len(message.params) > 0 else None
1170342
def mark_all_as_active(self, recipient=None):
        
        assert_soft_delete()
        qset = self.deleted()
        if recipient:
            qset = qset.filter(recipient=recipient)

        return qset.update(deleted=False)
2603
def _get_message(self, block=True, timeout=0.1, get_partition_info=None,
                     update_offset=True):
        
        start_at = time.time()
        while self.queue.empty():
            # We're out of messages, go grab some more.
            log.debug('internal queue empty, fetching more messages')
            with FetchContext(self, block, timeout):
                self._fetch()

            if not block or time.time() > (start_at + timeout):
                break

        try:
            partition, message = self.queue.get_nowait()

            if update_offset:
                # Update partition offset
                self.offsets[partition] = message.offset + 1

                # Count, check and commit messages if necessary
                self.count_since_commit += 1
                self._auto_commit()

            if get_partition_info is None:
                get_partition_info = self.partition_info
            if get_partition_info:
                return partition, message
            else:
                return message
        except queue.Empty:
            log.debug('internal queue empty after fetch - returning None')
            return None
727961
def get_obsolete_messages(self, domain):
        
        if domain not in self.domains:
            raise ValueError('Invalid domain: {0}'.format(domain))

        if domain not in self.messages or \
            'obsolete' not in self.messages[domain]:
            self._process_domain(domain)

        return self.messages[domain]['obsolete']
564909
def _dry_message_received(self, msg):
        """"""
        for callback in self._dry_wet_callbacks:
            callback(LeakSensorState.DRY)
        self._update_subscribers(0x11)
877845
def reply(self, message):
        
        if self.sessionActive:
            return self._gsmModem.sendUssd(message)
        else:
            raise InvalidStateException('USSD session is inactive')
776044
def pause(self):
        
        msg = cr.Message()
        msg.type = cr.PAUSE
        self.send_message(msg)
1281931
def msg(self, target, message, formatted=True, tags=None):
        """"""
        if formatted:
            message = unescape(message)

        self.send('PRIVMSG', params=[target, message], source=self.nick, tags=tags)
964630
def mark_deactivated(self,request,queryset):
        """"""
        rows_updated = queryset.update(Active=False, End=datetime.date.today() )
        if rows_updated == 1:
            message_bit = "1 cage was"
        else:
            message_bit = "%s cages were" % rows_updated
        self.message_user(request, "%s successfully marked as deactivated." % message_bit)
111606
public <T extends Collection<?>> T notEmpty(final T collection, final String message) {
        if (collection == null) {
            failNull(message);
        }
        if (collection.isEmpty()) {
            fail(message);
        }
        return collection;
    }
695739
def _on_message(self, bus, message):  # pylint: disable=unused-argument
        """"""
        if message.type == Gst.MessageType.EOS:
            self.stop()
        elif message.type == Gst.MessageType.ERROR:
            self.stop()
            err, _ = message.parse_error()
            _LOGGER.error('%s', err)