catch python error when unable to find user

This commit is contained in:
AlanCoding 2018-12-13 11:47:54 -05:00
parent 10e99c76a8
commit 65e110cdbf
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -267,7 +267,10 @@ TEST_SVN_PRIVATE_HTTPS = 'https://github.com/ansible/product-docs'
# To test repo access via SSH login to localhost.
import getpass
TEST_SSH_LOOPBACK_USERNAME = getpass.getuser()
try:
TEST_SSH_LOOPBACK_USERNAME = getpass.getuser()
except KeyError:
TEST_SSH_LOOPBACK_USERNAME = 'root'
TEST_SSH_LOOPBACK_PASSWORD = ''
###############################################################################