Skip to content

Commit

Permalink
MOD:版本配置重新定义
Browse files Browse the repository at this point in the history
  • Loading branch information
wswenyue committed Mar 13, 2024
1 parent 57b89f7 commit db378e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aklog.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# Created by wswenyue on 2018/11/4.
import argparse
import os
import subprocess
from typing import Optional, List, Dict, Any

Expand Down Expand Up @@ -53,7 +54,9 @@ class AkLogArgs(object):
cmd_name_define: Dict[str, List[str]] = {}

def __init__(self):
with open('./cfg.yml', 'r') as f:
cur_path = os.path.dirname(os.path.realpath(__file__))
cfg_path = os.path.join(cur_path, "cfg.yml")
with open(cfg_path, 'r') as f:
self.cfg = yaml.load(f, Loader=yaml.SafeLoader)
version = self.cfg['version']
self.AK_LOG_VERSION = f"{version['prefix']}{version['major']}.{version['minor']}.x"
Expand Down

0 comments on commit db378e9

Please sign in to comment.