leapp icon indicating copy to clipboard operation
leapp copied to clipboard

leapp answer command doesn't preserve comments in generated answerfile

Open fernflower opened this issue 5 years ago • 0 comments

[remove_pam_pkcs11_module_check]
# Title:              None
# Reason:             Confirmation
# =================== remove_pam_pkcs11_module_check.confirm ==================
# Label:              Disable pam_pkcs11 module in PAM configuration? If no, the upgrade process will be interrupted.
# Description:        PAM module pam_pkcs11 is no longer available in RHEL-8 since it was replaced by SSSD.
# Type:               bool
# Default:            None
# Available choices: True/False
# Unanswered question. Uncomment the following line with your answer
# confirm = 

After leapp answer --section remove_pam_pkcs11_module_check.confirm=True run you get

[remove_pam_pkcs11_module_check]
confirm = True

That happens because configparser in py2 doesn't have a way to preserve comments in ini file. Switch to cfgparse?

fernflower avatar Feb 11 '20 14:02 fernflower