From 335210adb97574bad682b6d22a8126f03742ce6c Mon Sep 17 00:00:00 2001 From: soju6jan Date: Mon, 3 Oct 2022 12:49:01 +0900 Subject: [PATCH] test --- lib/framework/init_declare.py | 11 ----------- lib/framework/init_menu.py | 17 +++-------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/lib/framework/init_declare.py b/lib/framework/init_declare.py index 7874dc4..04dc3d2 100644 --- a/lib/framework/init_declare.py +++ b/lib/framework/init_declare.py @@ -63,19 +63,8 @@ class CustomFormatter(logging.Formatter): # Suuport를 logger 생성전에 쓰지 않기 위해 중복 선언 def read_yaml(filepath): - import re - import yaml - print('111111111111') - print(filepath) - print('222222') - import sys - print(sys.argv) - print('333333333333') - - yaml.reader.Reader.NON_PRINTABLE = re.compile('[^\t\n\r -�-\U0010ffff]') with open(filepath, encoding='utf8') as file: - #with open(filepath, 'rb') as file: data = yaml.load(file, Loader=yaml.FullLoader) return data diff --git a/lib/framework/init_menu.py b/lib/framework/init_menu.py index 02907a5..3861572 100644 --- a/lib/framework/init_menu.py +++ b/lib/framework/init_menu.py @@ -1,9 +1,11 @@ -import copy import os import shutil + from support.base.yaml import SupportYaml + from framework import F + class MenuManager: menu_map = None @@ -18,21 +20,8 @@ class MenuManager: cls.menu_map = SupportYaml.read_yaml(menu_yaml_filepath) - """ - for cate in cls.menu_map: - cate['count'] = 0 - cls.menu_map.insert(len(cls.menu_map)-1, { - 'name':'미분류', 'count':0, 'list':[] - }) - cls.menu_map[-1]['count'] = 1 - F.logger.debug(cls.menu_map) - """ - - @classmethod def init_menu(cls): - #F.logger.debug(d(plugin_menus)) - #print(plugin_menus) cls.__load_menu_yaml() from .init_plugin import PluginManager plugin_menus = PluginManager.plugin_menus