comparison 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
comparison
equal deleted inserted replaced
3614:422049bb81d3 3626:82e616b70a2a
633 633
634 return content, item, item["id"] 634 return content, item, item["id"]
635 635
636 async def start(self): 636 async def start(self):
637 # if there are user defined extension, we use them 637 # if there are user defined extension, we use them
638 SYNTAX_EXT.update(config.getConfig(self.sat_conf, "jp", CONF_SYNTAX_EXT, {})) 638 SYNTAX_EXT.update(
639 config.getConfig(self.sat_conf, C.CONFIG_SECTION, CONF_SYNTAX_EXT, {})
640 )
639 self.current_syntax = await self.get_current_syntax() 641 self.current_syntax = await self.get_current_syntax()
640 642
641 ( 643 (
642 self.pubsub_service, 644 self.pubsub_service,
643 self.pubsub_node, 645 self.pubsub_node,
778 self.host.quit(1) 780 self.host.quit(1)
779 else: 781 else:
780 aionotify = None 782 aionotify = None
781 783
782 sat_conf = self.sat_conf 784 sat_conf = self.sat_conf
783 SYNTAX_EXT.update(config.getConfig(sat_conf, "jp", CONF_SYNTAX_EXT, {})) 785 SYNTAX_EXT.update(
786 config.getConfig(sat_conf, C.CONFIG_SECTION, CONF_SYNTAX_EXT, {})
787 )
784 788
785 try: 789 try:
786 self.open_cb_cmd = config.getConfig( 790 self.open_cb_cmd = config.getConfig(
787 sat_conf, "jp", "blog_preview_open_cmd", Exception 791 sat_conf, C.CONFIG_SECTION, "blog_preview_open_cmd", Exception
788 ) 792 )
789 except (NoOptionError, NoSectionError): 793 except (NoOptionError, NoSectionError):
790 self.open_cb_cmd = None 794 self.open_cb_cmd = None
791 open_cb = self.showPreview 795 open_cb = self.showPreview
792 else: 796 else:
793 open_cb = self.openPreviewExt 797 open_cb = self.openPreviewExt
794 798
795 self.update_cb_cmd = config.getConfig( 799 self.update_cb_cmd = config.getConfig(
796 sat_conf, "jp", "blog_preview_update_cmd", self.open_cb_cmd 800 sat_conf, C.CONFIG_SECTION, "blog_preview_update_cmd", self.open_cb_cmd
797 ) 801 )
798 if self.update_cb_cmd is None: 802 if self.update_cb_cmd is None:
799 update_cb = self.showPreview 803 update_cb = self.showPreview
800 else: 804 else:
801 update_cb = self.updatePreviewExt 805 update_cb = self.updatePreviewExt