From: Sergey Matveev Date: Mon, 13 Apr 2020 07:54:35 +0000 (+0300) Subject: Substitute class name in exception X-Git-Tag: 7.7~2 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=858cfc57f01b2b31b707fb4f808319ab877003dc Substitute class name in exception --- 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