Mercurial > libervia-backend
comparison sat_frontends/jp/cmd_blog.py @ 3631:bef32f3ccc06
merge branche "@"
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 27 Aug 2021 14:51:40 +0200 |
parents | 1709f0a78f50 82e616b70a2a |
children | 9ca19b317293 |
comparison
equal
deleted
inserted
replaced
3625:6559c0f847d4 | 3631:bef32f3ccc06 |
---|---|
635 | 635 |
636 return content, item, item["id"] | 636 return content, item, item["id"] |
637 | 637 |
638 async def start(self): | 638 async def start(self): |
639 # if there are user defined extension, we use them | 639 # if there are user defined extension, we use them |
640 SYNTAX_EXT.update(config.getConfig(self.sat_conf, "jp", CONF_SYNTAX_EXT, {})) | 640 SYNTAX_EXT.update( |
641 config.getConfig(self.sat_conf, C.CONFIG_SECTION, CONF_SYNTAX_EXT, {}) | |
642 ) | |
641 self.current_syntax = await self.get_current_syntax() | 643 self.current_syntax = await self.get_current_syntax() |
642 | 644 |
643 ( | 645 ( |
644 self.pubsub_service, | 646 self.pubsub_service, |
645 self.pubsub_node, | 647 self.pubsub_node, |
780 self.host.quit(1) | 782 self.host.quit(1) |
781 else: | 783 else: |
782 aionotify = None | 784 aionotify = None |
783 | 785 |
784 sat_conf = self.sat_conf | 786 sat_conf = self.sat_conf |
785 SYNTAX_EXT.update(config.getConfig(sat_conf, "jp", CONF_SYNTAX_EXT, {})) | 787 SYNTAX_EXT.update( |
788 config.getConfig(sat_conf, C.CONFIG_SECTION, CONF_SYNTAX_EXT, {}) | |
789 ) | |
786 | 790 |
787 try: | 791 try: |
788 self.open_cb_cmd = config.getConfig( | 792 self.open_cb_cmd = config.getConfig( |
789 sat_conf, "jp", "blog_preview_open_cmd", Exception | 793 sat_conf, C.CONFIG_SECTION, "blog_preview_open_cmd", Exception |
790 ) | 794 ) |
791 except (NoOptionError, NoSectionError): | 795 except (NoOptionError, NoSectionError): |
792 self.open_cb_cmd = None | 796 self.open_cb_cmd = None |
793 open_cb = self.showPreview | 797 open_cb = self.showPreview |
794 else: | 798 else: |
795 open_cb = self.openPreviewExt | 799 open_cb = self.openPreviewExt |
796 | 800 |
797 self.update_cb_cmd = config.getConfig( | 801 self.update_cb_cmd = config.getConfig( |
798 sat_conf, "jp", "blog_preview_update_cmd", self.open_cb_cmd | 802 sat_conf, C.CONFIG_SECTION, "blog_preview_update_cmd", self.open_cb_cmd |
799 ) | 803 ) |
800 if self.update_cb_cmd is None: | 804 if self.update_cb_cmd is None: |
801 update_cb = self.showPreview | 805 update_cb = self.showPreview |
802 else: | 806 else: |
803 update_cb = self.updatePreviewExt | 807 update_cb = self.updatePreviewExt |