summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Matveev <stargrave@stargrave.org>2020-04-13 10:54:35 +0300
committerSergey Matveev <stargrave@stargrave.org>2020-04-13 10:54:35 +0300
commit858cfc57f01b2b31b707fb4f808319ab877003dc (patch)
tree638f5366766d6caa90e45eae66b080ddc4c6587e
parent1285a47fd22a99a87354496ade8b392ff874d8b8 (diff)
downloadpyderasn-858cfc57f01b2b31b707fb4f808319ab877003dc.tar.xz
Substitute class name in exception
-rwxr-xr-xpyderasn.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pyderasn.py b/pyderasn.py
index bc5358a..15ca386 100755
--- a/pyderasn.py
+++ b/pyderasn.py
@@ -5874,7 +5874,7 @@ class Any(Obj):
def _value_sanitize(self, value):
if value.__class__ == binary_type:
if len(value) == 0:
- raise ValueError("Any value can not be empty")
+ raise ValueError("%s value can not be empty" % self.__class__.__name__)
return value
if isinstance(value, self.__class__):
return value._value