From 927dc03d1b99a128c05f2febc4edcd9f19011b6e Mon Sep 17 00:00:00 2001 From: Ricardo Baratto Date: Wed, 13 Aug 2025 18:16:45 -0400 Subject: [PATCH] small tweak to allow importing the CHB python code in windows os.uname is not present in windows, but platform.uname is. note that this only allows you to import the code in windows, depending on what functionality is needed, additional changes will be needed --- chb/util/Config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chb/util/Config.py b/chb/util/Config.py index 35d7153c..72fe52df 100644 --- a/chb/util/Config.py +++ b/chb/util/Config.py @@ -29,6 +29,7 @@ """Contains the locations of various components used by the analyzer.""" import os +import platform from typing import Any, Dict, List @@ -44,10 +45,12 @@ class Config(): def __init__(self) -> None: # platform settings - if os.uname()[0] == 'Linux': + if platform.uname()[0] == 'Linux': self.platform = 'linux' - elif os.uname()[0] == 'Darwin': + elif platform.uname()[0] == 'Darwin': self.platform = 'macOS' + else: + self.platform = "Unknown" # general settings self.utildir = os.path.dirname(os.path.abspath(__file__))