def get_gerrit_username(server, ssh_port):
    # Get username
    qibuild_cfg = qibuild.config.QiBuildConfig()
    qibuild_cfg.read(create_if_missing=True)
    access = qibuild_cfg.get_server_access(server)
    if access:
        username = access.username
    else:
        username = ask_gerrit_username(server, ssh_port=ssh_port)
        if not username:
            return None

    # Add it to config so we ask only once
    qibuild_cfg.set_server_access(server, username)
    qibuild_cfg.write()
    return username
Get the username to use when using code review.
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/review.py/get_gerrit_username