From cd146fa3055e0afd0daee0585f76b38a254dc054 Mon Sep 17 00:00:00 2001 From: detiam Date: Tue, 5 Nov 2024 11:24:46 +0800 Subject: [PATCH] generate_emu_config: allow only have username in `my_login.txt` --- tools/generate_emu_config/generate_emu_config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/generate_emu_config/generate_emu_config.py b/tools/generate_emu_config/generate_emu_config.py index 5fa7661c..2e56350e 100644 --- a/tools/generate_emu_config/generate_emu_config.py +++ b/tools/generate_emu_config/generate_emu_config.py @@ -710,9 +710,10 @@ def main(): filedata = f.readlines() filedata = list(map(lambda s: s.replace("\r", "").replace("\n", ""), filedata)) filedata = [l for l in filedata if l] - if len(filedata) == 2: + if len(filedata) == 1: USERNAME = filedata[0] - PASSWORD = filedata[1] + elif len(filedata) == 2: + USERNAME, PASSWORD = filedata[0], filedata[1] # then allow the env vars to override the login details env_username = os.environ.get('GSE_CFG_USERNAME', None)