コード例 #1
0
class RepoTagCompleter(object):

    def __call__(self, prefix, parsed_args, **kwargs):
        self.httpClient = HttpClient(hostname=parsed_args.hostname, port=parsed_args.port)
        response = self.httpClient.tagList(parsed_args.reponame)
        tag_str = response.read()
        return (tag for tag in tag_str.splitlines() if tag.startswith(prefix))
コード例 #2
0
class RepoTagCompleter(object):
    def __call__(self, prefix, parsed_args, **kwargs):
        self.httpClient = HttpClient(hostname=parsed_args.hostname,
                                     port=parsed_args.port)
        response = self.httpClient.tagList(parsed_args.reponame)
        tag_str = response.read()
        return (tag for tag in tag_str.splitlines() if tag.startswith(prefix))