From f5b5c8da09d988eab97dbc4a0fcf5eb5d82e79ba Mon Sep 17 00:00:00 2001 From: thijs snijder <snijder@astron.nl> Date: Tue, 12 Apr 2022 16:02:09 +0200 Subject: [PATCH] attempting to change bug, changed logging --- .../toolkit/mib_compiler/mib_compiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/toolkit/mib_compiler/mib_compiler.py b/tangostationcontrol/tangostationcontrol/toolkit/mib_compiler/mib_compiler.py index 756c47885..a96f2c346 100644 --- a/tangostationcontrol/tangostationcontrol/toolkit/mib_compiler/mib_compiler.py +++ b/tangostationcontrol/tangostationcontrol/toolkit/mib_compiler/mib_compiler.py @@ -3,7 +3,7 @@ import sys from pysnmp.smi import builder, compiler -import os +from pathlib import Path from pysmi import debug import logging @@ -27,7 +27,7 @@ def mib_compile(mib_list : list, src, dst): raise Exception(f"Something went wrong, try checking whether all the mib fills imported by the provided mib files are present in the source locations ({src}) \r\n (To do this enable debug options and scroll up) ") from e def main(): - abs_path = os.path.dirname(__file__).replace("\\", "/") + abs_path = str(Path().absolute()).replace("\\", "/") out_path = f"{abs_path}/output_pymibs" in_path = f"{abs_path}/mibs" @@ -56,7 +56,7 @@ def main(): debug_option = args.debug if debug_option: - debug.setLogger(debug.Debug('all')) + debug.setLogger(debug.Debug('compiler')) mib_compile(mib_list=mibs, src=source, dst=destination) -- GitLab