Merge pull request #4517 from jakemcdermott/fix-akit-shell-init

fix akit shell init when no credential config is provided

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-08-27 14:36:34 +00:00 committed by GitHub
commit 92b9176455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,13 +60,17 @@ def main():
if akit_args.credential_file != utils.not_provided:
config.credentials = utils.load_credentials(
akit_args.credential_file)
else:
config.credentials = utils.PseudoNamespace({
'default': {
'username': os.getenv('AWXKIT_USER', 'admin'),
'password': os.getenv('AWXKIT_USER_PASSWORD', 'password')
}
})
if akit_args.project_file != utils.not_provided:
config.project_urls = utils.load_projects(
akit_args.project_file)
else:
config.credentials = utils.PseudoNamespace({'default': {'username': os.getenv(
'AWXKIT_USER', 'admin'), 'password': os.getenv('AWXKIT_USER_PASSWORD', 'password')}})
global root
root = api.Api()