diff --git a/sat_frontends/jp/cmd_avatar.py b/sat_frontends/jp/cmd_avatar.py index 228a070b..50b66d0a 100644 --- a/sat_frontends/jp/cmd_avatar.py +++ b/sat_frontends/jp/cmd_avatar.py @@ -49,7 +49,7 @@ class Get(base.CommandBase): async def showImage(self, path): sat_conf = config.parseMainConf() - cmd = config.getConfig(sat_conf, "jp", "image_cmd") + cmd = config.getConfig(sat_conf, C.CONFIG_SECTION, "image_cmd") cmds = [cmd] + DISPLAY_CMD if cmd else DISPLAY_CMD for cmd in cmds: try: diff --git a/sat_frontends/jp/cmd_blog.py b/sat_frontends/jp/cmd_blog.py index 62418eed..cc2d5637 100644 --- a/sat_frontends/jp/cmd_blog.py +++ b/sat_frontends/jp/cmd_blog.py @@ -635,7 +635,9 @@ class Edit(base.CommandBase, BlogPublishCommon, common.BaseEdit): async def start(self): # if there are user defined extension, we use them - SYNTAX_EXT.update(config.getConfig(self.sat_conf, "jp", CONF_SYNTAX_EXT, {})) + SYNTAX_EXT.update( + config.getConfig(self.sat_conf, C.CONFIG_SECTION, CONF_SYNTAX_EXT, {}) + ) self.current_syntax = await self.get_current_syntax() ( @@ -780,11 +782,13 @@ class Preview(base.CommandBase, common.BaseEdit): aionotify = None sat_conf = self.sat_conf - SYNTAX_EXT.update(config.getConfig(sat_conf, "jp", CONF_SYNTAX_EXT, {})) + SYNTAX_EXT.update( + config.getConfig(sat_conf, C.CONFIG_SECTION, CONF_SYNTAX_EXT, {}) + ) try: self.open_cb_cmd = config.getConfig( - sat_conf, "jp", "blog_preview_open_cmd", Exception + sat_conf, C.CONFIG_SECTION, "blog_preview_open_cmd", Exception ) except (NoOptionError, NoSectionError): self.open_cb_cmd = None @@ -793,7 +797,7 @@ class Preview(base.CommandBase, common.BaseEdit): open_cb = self.openPreviewExt self.update_cb_cmd = config.getConfig( - sat_conf, "jp", "blog_preview_update_cmd", self.open_cb_cmd + sat_conf, C.CONFIG_SECTION, "blog_preview_update_cmd", self.open_cb_cmd ) if self.update_cb_cmd is None: update_cb = self.showPreview diff --git a/sat_frontends/jp/common.py b/sat_frontends/jp/common.py index 2e1e46fa..7c9ecc6e 100644 --- a/sat_frontends/jp/common.py +++ b/sat_frontends/jp/common.py @@ -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