summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--pysnmp/entity/rfc3413/cmdrsp.py4
-rw-r--r--pysnmp/smi/error.py2
3 files changed, 7 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 0075a22..15ad6ff 100644
--- a/CHANGES
+++ b/CHANGES
@@ -71,6 +71,7 @@ Revision 4.2.6rc0
- Fix to licensing terms of multiple twisted backend modules to make
the whole pysnmp package licensed under BSD 2-Clause license. This
change has been explicitly permitted by the original modules authors.
+- Missing wrongLength and wrongEncoding SMI errors added.
Revision 4.2.5
--------------
diff --git a/pysnmp/entity/rfc3413/cmdrsp.py b/pysnmp/entity/rfc3413/cmdrsp.py
index fd3d4c0..f0f3fbd 100644
--- a/pysnmp/entity/rfc3413/cmdrsp.py
+++ b/pysnmp/entity/rfc3413/cmdrsp.py
@@ -154,6 +154,10 @@ class CommandResponderBase:
errorStatus, errorIndex = 'noAccess', sys.exc_info()[1]['idx']+1
except pysnmp.smi.error.WrongTypeError:
errorStatus, errorIndex = 'wrongType', sys.exc_info()[1]['idx']+1
+ except pysnmp.smi.error.WrongLengthError:
+ errorStatus, errorIndex = 'wrongLength', sys.exc_info()[1]['idx']+1
+ except pysnmp.smi.error.WrongEncodingError:
+ errorStatus, errorIndex='wrongEncoding', sys.exc_info()[1]['idx']+1
except pysnmp.smi.error.WrongValueError:
errorStatus, errorIndex = 'wrongValue', sys.exc_info()[1]['idx']+1
except pysnmp.smi.error.NoCreationError:
diff --git a/pysnmp/smi/error.py b/pysnmp/smi/error.py
index b55e764..cb0de11 100644
--- a/pysnmp/smi/error.py
+++ b/pysnmp/smi/error.py
@@ -17,6 +17,8 @@ class MibOperationError(SmiError):
class GenError(MibOperationError): pass
class NoAccessError(MibOperationError): pass
class WrongTypeError(MibOperationError): pass
+class WrongLengthError(MibOperationError): pass
+class WrongEncodingError(MibOperationError): pass
class WrongValueError(MibOperationError): pass
class NoCreationError(MibOperationError): pass
class InconsistentValueError(MibOperationError): pass