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

updated incomplete exceptions

parent da041290
No related branches found
No related tags found
1 merge request!402Resolve L2SS-828 "Dts outside integration changes"
......@@ -161,7 +161,7 @@ class snmp_attribute:
errorIndication, errorStatus, errorIndex, *varBinds = self.comm.getter(self.objs)
if errorIndication is not None:
raise Exception("An error occurred while attempting to read ")
raise IOError(f"An error occurred while attempting to write '{self.name}'. errorIndication: {errorIndication}")
# get all the values in a list converted to the correct type
val_lst = self.convert(varBinds)
......@@ -182,7 +182,7 @@ class snmp_attribute:
errorIndication, errorStatus, errorIndex, *varBinds = self.comm.setter(write_obj)
if errorIndication is not None:
raise Exception("An error occurred while attempting to read ")
raise IOError(f"An error occurred while attempting to write '{self.name}'. errorIndication: {errorIndication}")
def convert(self, var_binds):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment