diff --git a/tangostationcontrol/tangostationcontrol/toolkit/mib_compiler/mib_compiler.py b/tangostationcontrol/tangostationcontrol/toolkit/mib_compiler/mib_compiler.py index 756c47885ded07781198c33cdd7a66391eaf8c04..a96f2c34670d900665dce697c048e1460866c89f 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)