Skip to content

Commit 6f60e1f

Browse files
committed
Simplest traceback detection fix
1 parent c5a3949 commit 6f60e1f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

interpreter/core/computer/skills/skills.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def import_skills(self):
4949

5050
output = self.computer.run("python", code_to_run)
5151

52-
if type(output) == str and "traceback" in output.lower():
52+
if "traceback" in str(output).lower():
5353
# Import them individually
5454
for file in glob.glob(os.path.join(self.path, "*.py")):
5555
with open(file, "r") as f:
@@ -60,7 +60,7 @@ def import_skills(self):
6060

6161
output = self.computer.run("python", code_to_run)
6262

63-
if type(output) == str and "traceback" in output.lower():
63+
if "traceback" in str(output).lower():
6464
print(
6565
f"Skill at {file} might be broken— it produces a traceback when run."
6666
)

0 commit comments

Comments
 (0)