mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2026-04-22 02:59:17 -04:00
Prefer using repr() on the Dev cog results (excl. str instances) (#6726)
This commit is contained in:
@@ -158,7 +158,7 @@ class DevOutput:
|
|||||||
output.append(self.formatted_exc)
|
output.append(self.formatted_exc)
|
||||||
elif self.always_include_result or self.result is not None:
|
elif self.always_include_result or self.result is not None:
|
||||||
try:
|
try:
|
||||||
result = str(self.result)
|
result = str(self.result) if isinstance(self.result, str) else repr(self.result)
|
||||||
# ensure that the result can be encoded (GH-6485)
|
# ensure that the result can be encoded (GH-6485)
|
||||||
result.encode("utf-8")
|
result.encode("utf-8")
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
|||||||
Reference in New Issue
Block a user