Handle if environment variable DOCKER_ACCOUNT is undefined

This commit is contained in:
grossmj 2023-05-29 19:32:57 +08:00
parent 72c91376f3
commit da2d2d49d5

View File

@ -412,7 +412,7 @@ def xor(*params):
args = parser.parse_args()
sys.stdout.reconfigure(line_buffering=True)
docker_login = {"account": os.environ.get("DOCKER_ACCOUNT").lower(),
docker_login = {"account": os.environ.get("DOCKER_ACCOUNT", "").lower(),
"password": os.environ.pop("DOCKER_PASSWORD", None)}
if docker_login["account"]:
docker_login["account"] = docker_login["account"].rstrip("/")