From 020c8fb9b1382d2ef7a82b7feb3cfad5e5d95910 Mon Sep 17 00:00:00 2001 From: Christophe Vandeplas Date: Wed, 5 Jun 2024 10:27:03 +0200 Subject: [PATCH] fix: fixes issue with version --- parsers/taskinfo.py | 1 + utils/misc.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/parsers/taskinfo.py b/parsers/taskinfo.py index 4003f87..86273fd 100644 --- a/parsers/taskinfo.py +++ b/parsers/taskinfo.py @@ -47,6 +47,7 @@ def parse_path(path: str) -> dict: if 'threads:' in lines[n - 1]: # end of main block detected process = tabbasedhierarchy.parse_block(extracted_block) + # TODO extract process id and process_name from process['process'] line process['threads'] = [] pass else: diff --git a/utils/misc.py b/utils/misc.py index 76c16b0..83b1cb8 100644 --- a/utils/misc.py +++ b/utils/misc.py @@ -8,12 +8,13 @@ import binascii from functools import singledispatch import base64 +from pathlib import Path def get_version(filename="VERSION.txt"): """Read the program version from VERSION.txt""" try: - script_dir = os.path.dirname(os.path.abspath(__file__)) + script_dir = Path(__file__).parent.parent print(script_dir) version_file = os.path.join(script_dir, filename) with open(version_file, "r") as file: