CLI: fix section used for config following name change

This commit is contained in:
Goffi 2021-08-27 14:46:52 +02:00
commit c8572b8f21

View file

@ -199,13 +199,13 @@ class BaseEdit(object):
content_file_obj.close()
# we prepare arguments
editor = config.getConfig(self.sat_conf, "jp", "editor") or os.getenv(
editor = config.getConfig(self.sat_conf, C.CONFIG_SECTION, "editor") or os.getenv(
"EDITOR", "vi"
)
try:
# is there custom arguments in sat.conf ?
editor_args = config.getConfig(
self.sat_conf, "jp", editor_args_opt, Exception
self.sat_conf, C.CONFIG_SECTION, editor_args_opt, Exception
)
except (NoOptionError, NoSectionError):
# no, we check if we know the editor and have special arguments