Skip to content
Snippets Groups Projects
Commit e2e1f483 authored by Taya Snijder's avatar Taya Snijder
Browse files

organised snmp dev

parent 67e5f961
Branches
Tags
1 merge request!288Resolve L2SS-446 "Extend snmp client to support mib files"
...@@ -112,11 +112,12 @@ class SNMP(lofar_device): ...@@ -112,11 +112,12 @@ class SNMP(lofar_device):
# create the mib_loader # create the mib_loader
loader = mib_loader() loader = mib_loader()
# get the full mib directory adding the given relative path to the absolute path of this # if the string doesn't start with '/' it is a relative directory and we need to prepend the full path + '/'
if self.SNMP_rel_mib_dir[0] == "/": if self.SNMP_rel_mib_dir[0] != "/":
mib_path = os.path.dirname(__file__) + self.SNMP_rel_mib_dir
else:
mib_path = os.path.dirname(__file__) + "/" + self.SNMP_rel_mib_dir mib_path = os.path.dirname(__file__) + "/" + self.SNMP_rel_mib_dir
else:
# if the string does start with
mib_path = self.SNMP_rel_mib_dir
# set the directory with the compiled mib files. # set the directory with the compiled mib files.
loader.set_pymib_dir(mib_path) loader.set_pymib_dir(mib_path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment