

def resolve_credentials(user, token, file):
    if (file is not None):
        if os.path.isfile(file):
            return read_credentials_file(file)
    if ((file is None) or (len(user.strip()) == 0)):
        git_user = input('Please enter your Github username: ').strip()
    else:
        git_user = user
    if (git_user == ''):
        show_error_and_exit('Empty username provided!')
    if ((token is None) or (len(token.strip()) == 0)):
        git_token = getpass(('Please enter your Github Personal access token with read:org ' + 'permissions: ')).strip()
    else:
        git_token = token
    if (git_token == ''):
        show_error_and_exit('Empty token provided!')
    return (git_user, git_token)

dataset/ETHPy150Open databricks/spark-package-cmd-tool/python/spark_package/spark_package.py resolve_credentials/VarMisuse@47/54 `user`->`file`