diff --git a/kolla_cli/common/utils.py b/kolla_cli/common/utils.py index e4029d4..41a0114 100644 --- a/kolla_cli/common/utils.py +++ b/kolla_cli/common/utils.py @@ -180,6 +180,9 @@ def change_password(file_path, pname, pvalue=None, public_key=None, """ read_data = sync_read_file(file_path) file_pwds = yaml.safe_load(read_data) + # if the password file is empty file_pwds will be None after safe_load + if file_pwds is None: + file_pwds = {} if clear: # clear if pname in file_pwds: