]> Cypherpunks.ru repositories - pyderasn.git/commitdiff
Substitute class name in exception
authorSergey Matveev <stargrave@stargrave.org>
Mon, 13 Apr 2020 07:54:35 +0000 (10:54 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 13 Apr 2020 07:54:35 +0000 (10:54 +0300)
pyderasn.py

index bc5358a78cfa4e487efc99dd9db3f714bf0d20ea..15ca386b89894c7c4278fc2914f5ca9c3b44e199 100755 (executable)
@@ -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