Skip to content
Snippets Groups Projects
Commit 9645152c authored by jmaslanka's avatar jmaslanka 👾
Browse files

fix __str__

parent 67b85927
No related branches found
No related tags found
No related merge requests found
Pipeline #64741 passed with stages
in 6 minutes and 5 seconds
# v2.26.7 # v2.26.7
* _TBA_ * fixed `__str__` method of `CustomException`
# v2.26.6 # v2.26.6
......
...@@ -29,7 +29,7 @@ class CustomException(Exception): ...@@ -29,7 +29,7 @@ class CustomException(Exception):
a = '%s(%s' % (self.__class__.__qualname__.split('.')[-1], ', '.join(map(repr, self.args))) a = '%s(%s' % (self.__class__.__qualname__.split('.')[-1], ', '.join(map(repr, self.args)))
try: try:
if self.kwargs: if self.kwargs:
a += ', ' + ', '.join(map(lambda k, v: '%s=%s' % (k, repr(v)), self.kwargs.items())) a += ', ' + ', '.join('%s=%s' % (k, repr(v)) for k, v in self.kwargs.items())
except AttributeError: except AttributeError:
pass pass
a += ')' a += ')'
...@@ -42,8 +42,7 @@ class CustomException(Exception): ...@@ -42,8 +42,7 @@ class CustomException(Exception):
', '.join(map(repr, self.args))) ', '.join(map(repr, self.args)))
try: try:
if self.kwargs: if self.kwargs:
a += ', ' + (', '.join(map(lambda kv: '%s=%s' % (kv[0], repr(kv[1])), a += ', ' + ', '.join('%s=%s' % (k, repr(v)) for k, v in self.kwargs.items())
self.kwargs.items())))
except AttributeError: except AttributeError:
pass pass
a += ')' a += ')'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment