This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit dec3951ad50ee41b6c11275f598c3d348a0ac8a7 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Wed Jun 24 18:21:23 2015 +0200 exception raised on snmp conn on more cases --- app/modules/connection_modules/snmp.py | 8 ++++++++ app/modules/connection_modules/snmp_walk.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/app/modules/connection_modules/snmp.py b/app/modules/connection_modules/snmp.py index 1deff5f..d21590d 100644 --- a/app/modules/connection_modules/snmp.py +++ b/app/modules/connection_modules/snmp.py @@ -43,12 +43,20 @@ class SNMP: # Check for errors and print out results if errorIndication: self.logger.warning(errorIndication) + exception_inst = getattr(self.CommandNotFoundException, "CommandNotFoundException")( + cmd, self.addr_host + ) + raise exception_inst else: if errorStatus: self.logger.warning('%s at %s' % ( errorStatus.prettyPrint(), errorIndex and varBinds[int(errorIndex)-1] or '?' )) + exception_inst = getattr(self.CommandNotFoundException, "CommandNotFoundException")( + cmd, self.addr_host + ) + raise exception_inst else: for name, val in varBinds: if val == "": diff --git a/app/modules/connection_modules/snmp_walk.py b/app/modules/connection_modules/snmp_walk.py index c3ddcd2..1e0f28d 100644 --- a/app/modules/connection_modules/snmp_walk.py +++ b/app/modules/connection_modules/snmp_walk.py @@ -43,12 +43,20 @@ class SNMPWalk: # Check for errors and print out results if errorIndication: self.logger.warning(errorIndication) + exception_inst = getattr(self.CommandNotFoundException, "CommandNotFoundException")( + cmd, self.addr_host + ) + raise exception_inst else: if errorStatus: self.logger.warning('%s at %s' % ( errorStatus.prettyPrint(), errorIndex and varBindTable[-1][int(errorIndex)-1] or '?' )) + exception_inst = getattr(self.CommandNotFoundException, "CommandNotFoundException")( + cmd, self.addr_host + ) + raise exception_inst else: for varBindTableRow in varBindTable: for name, val in varBindTableRow: -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.