Lasdw commited on
Commit
35d424d
·
1 Parent(s): 30e851e

Improved python code tool

Browse files
Files changed (1) hide show
  1. agent.py +1 -1
agent.py CHANGED
@@ -67,7 +67,7 @@ def run_python_code(code: str):
67
  # Also allow basic numpy/pandas imports
68
  is_safe = is_safe or line.startswith("import numpy") or line.startswith("import pandas")
69
  if not is_safe:
70
- return f"Error: Code contains potentially unsafe import: {line}"
71
 
72
  try:
73
  # Capture stdout to get print output
 
67
  # Also allow basic numpy/pandas imports
68
  is_safe = is_safe or line.startswith("import numpy") or line.startswith("import pandas")
69
  if not is_safe:
70
+ return f"Error: Code contains potentially unsafe import: {line}"
71
 
72
  try:
73
  # Capture stdout to get print output