示例#1
0
    def show_repos(self):
        # relay info
        relays = get_peers_by_role ("MyRelay")
        # remove name unresolved relay
        relays = [relay for relay in relays if relay.name]

        # get repos info
        repos = get_repos()
        for repo in repos:
            # is_broken is not used now, we should clean it later
            repo.is_broken = False
            try:
                prepare_repo_info(repo)
            except SearpcError, e:
                repo.is_broken = True
                repo.error_msg = e.msg
示例#2
0
文件: main.py 项目: sheyong/seafile
    def show_repos(self):
        # relay info
        sinfo = ccnet_rpc.get_session_info()
        relays = get_peers_by_role ("MyRelay")
        drelay = None
        if sinfo.props.default_relay:
            for relay in relays:
                if relay.props.id == sinfo.props.default_relay:
                    drelay = relay
                    break

        # get repos info
        repos = get_repos()
        for repo in repos:
            # is_broken is not used now, we should clean it later
            repo.is_broken = False
            try:
                prepare_repo_info(repo)
            except SearpcError, e:
                repo.is_broken = True
                repo.error_msg = e.msg