def _check_team_login(team):
    """
    Disallow simultaneous public cloud and team logins.
    """
    contents = _load_auth()

    for auth in itervalues(contents):
        existing_team = auth.get('team')
        if team and team != existing_team:
            raise CommandException(
                "Can't log in as team %r; log out first." % team
            )
        elif not team and existing_team:
            raise CommandException(
                "Can't log in as a public user; log out from team %r first." % existing_team
            )
def _check_team_login ( team ) : contents = _load_auth ( ) for auth in itervalues ( contents ) : existing_team = auth . get ( 'team' ) if team and team != existing_team : raise CommandException ( "Can't log in as team %r; log out first." % team ) elif not team and existing_team : raise CommandException ( "Can't log in as a public user; log out from team %r first." % existing_team )
Disallow simultaneous public cloud and team logins.