mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-29 01:27:29 +00:00
Correctly handle absent prefix/suffix in reraise
This commit is contained in:
@@ -34,8 +34,8 @@ class ReraisedException(Exception):
|
||||
|
||||
orig = "%s: %s" % (full_class_name(self.old_exc), klass.__str__(self.old_exc))
|
||||
prefixpart = suffixpart = ''
|
||||
if self.prefix != '':
|
||||
if self.prefix is not None:
|
||||
prefixpart = self.prefix + "\n"
|
||||
if self.suffix != '':
|
||||
if self.suffix is not None:
|
||||
suffixpart = "\n\n" + self.suffix
|
||||
return "%sThe original exception was:\n\n%s%s" % (prefixpart, orig, suffixpart)
|
||||
|
Reference in New Issue
Block a user