(self)
return running_containers
Return running container objects list, except ouroboros itself
Return running container objects list, except ouroboros itself
Return running container objects list except ouroboros itself
def running_filter(self):
        """Return running container objects list, except ouroboros itself"""
        running_containers = []
        try:
            for container in self.client.containers.list(filters={'status': 'running'}):
                if self.config.self_update:
                    running_containers.append(container)
                else:
                    try:
                        if 'ouroboros' not in container.image.tags[0]:
                            if container.attrs['HostConfig']['AutoRemove']:
                                self.logger.debug("Skipping %s due to --rm property.", container.name)
                            else:
                                running_containers.append(container)
                    except IndexError:
                        self.logger.error("%s has no tags.. you should clean it up! Ignoring.", container.id)
                        continue

        except DockerException:
            self.logger.critical("Can't connect to Docker API at %s", self.config.docker_socket)
            exit(1)

        return running_containers
def running_filter ( self ) : running_containers = [ ] try : for container in self . client . containers . list ( filters = { 'status' : 'running' } ) : if self . config . self_update : running_containers . append ( container ) else : try : if 'ouroboros' not in container . image . tags [ 0 ] : if container . attrs [ 'HostConfig' ] [ 'AutoRemove' ] : self . logger . debug ( "Skipping %s due to --rm property." , container . name ) else : running_containers . append ( container ) except IndexError : self . logger . error ( "%s has no tags.. you should clean it up! Ignoring." , container . id ) continue except DockerException : self . logger . critical ( "Can't connect to Docker API at %s" , self . config . docker_socket ) exit ( 1 ) return running_containers