Stop reading when gets None
428583
async def read(self):
        
        payload = await self._queue.get()
        self._queue.task_done()
        return payload
129131
def ignore(self, matcher):
        '''
         
        '''
        events  = self.eventtree.findAndRemove(matcher)
        for e in events:
            self.queue.unblock(e)
            e.canignore = True
740298
def remove_none_value(data):
    
    return dict((k, v) for k, v in data.items() if v is not None)
759049
def terminate_process(self, idf):
        
        try:
            p = self.q.pop(idf)
            p.terminate()
            return p
        except:
            return None
778421
def _skip_frame(self):
        """"""
        for line in self._f:
            if line == 'ITEM: ATOMS\n':
                break
        for i in range(self.num_atoms):
            next(self._f)
101953
def noop(*layers):
    """"""

    def begin_update(X, drop=0.0):
        return X, lambda D, *a, **k: D

    return begin_update
1030381
def skip():
	""""""

	if not settings.platformCompatible():
		return False

	(output, error) = subprocess.Popen(["osascript", "-e", SKIP], stdout=subprocess.PIPE).communicate()
1338001
def ignore_at(clock, coro=None, *args, timeout_result=None):
    '''
    
    '''
    if coro:
        return _ignore_after_func(clock, True, coro, args, timeout_result)

    return TimeoutAfter(clock, absolute=True, ignore=True)
413976
def _not_none(items):
    """"""
    if not isinstance(items, (tuple, list)):
        items = (items,)
    return all(item is not _none for item in items)
223862
def override_ignore_outcome(ini):
    """"""
    travis_reader = tox.config.SectionReader("travis", ini)
    return travis_reader.getbool('unignore_outcomes', False)
704223
private int skipNewLines(StreamTokenizer tokeniser, Reader in, String token) throws ParserException, IOException {
        for (int i = 0;; i++) {
            try {
                return assertToken(tokeniser, in, StreamTokenizer.TT_WORD);
            } catch (ParserException exc) {
                //Skip a maximum of 10 newlines, linefeeds etc at the beginning
                if (i == IGNORE_BEGINNING_NON_WORD_COUNT) {
                    throw exc;
                }
            }
        }
    }
572057
def process_read_exception(exc, path, ignore=None):
    '''
    
    '''
    if ignore is not None:
        if isinstance(ignore, six.integer_types):
            ignore = (ignore,)
    else:
        ignore = ()

    if exc.errno in ignore:
        return

    if exc.errno == errno.ENOENT:
        raise CommandExecutionError('{0} does not exist'.format(path))
    elif exc.errno == errno.EACCES:
        raise CommandExecutionError(
            'Permission denied reading from {0}'.format(path)
        )
    else:
        raise CommandExecutionError(
            'Error {0} encountered reading from {1}: {2}'.format(
                exc.errno, path, exc.strerror
            )
        )
1161067
def _read_http_none(self, size, kind, flag):
        """"""
        if any((int(bit, base=2) for bit in flag)):
            raise ProtocolError(f'HTTP/2: [Type {kind}] invalid format', quiet=True)

        data = dict(
            flags=None,
            payload=self._read_fileng(size - 9) or None,
        )

        return data
88953
def stop(self):
        
        self.keep_reading = False
        if self.readthread is not None:
            self.readthread.join()
            self.readthread = None
73205
def pop(self):
        """"""

        if self.reading is None:
            raise StreamEmptyError("Pop called on virtual stream walker without any data", selector=self.selector)

        reading = self.reading

        # If we're not a constant stream, we just exhausted ourselves
        if self.selector.match_type != DataStream.ConstantType:
            self.reading = None

        return reading
435159
def _skip_to_blank(f, spacegroup, setting):
    """"""
    while True:
        line = f.readline()
        if not line:
            raise SpacegroupNotFoundError(
                'invalid spacegroup %s, setting %i not found in data base' % 
                ( spacegroup, setting ) )
        if not line.strip():
            break
232104
def read(self, n=None):
        
        response = b""
        while n is None or n > 0:
            c = self.stream.read(1)
            if c == b"":
                break
            elif c == b"<":
                c += self.stream.read(1)
                if c == b"<?":
                    while True:
                        q = self.stream.read(1)
                        if q == b">":
                            break
                else:
                    response += c
                    if n is not None:
                        n -= len(c)
            else:
                response += c
                if n is not None:
                    n -= 1
        return response