diff sat_frontends/jp/cmd_blog.py @ 3626:82e616b70a2a

CLI: fix section used for config following name change
author Goffi <goffi@goffi.org>
date Fri, 27 Aug 2021 14:46:52 +0200
parents 04283582966f
children bef32f3ccc06
line wrap: on
line diff
--- a/sat_frontends/jp/cmd_blog.py	Mon Aug 02 21:47:22 2021 +0200
+++ b/sat_frontends/jp/cmd_blog.py	Fri Aug 27 14:46:52 2021 +0200
@@ -635,7 +635,9 @@
 
     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 @@
             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 @@
             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