Basti1110 commited on
Commit
7fc151f
·
verified ·
1 Parent(s): 392c927

with open(html_output, "w", encoding="utf-8") as f: f.write(html_content)

Browse files
Files changed (1) hide show
  1. render_report.py +4 -2
render_report.py CHANGED
@@ -5,8 +5,10 @@ import matplotlib.pyplot as plt
5
  import networkx as nx
6
 
7
  # Ensure /mnt/data exists
 
8
  output_dir = "/mnt/data"
9
- os.makedirs(output_dir, exist_ok=True)
 
10
 
11
  # Load JSON
12
  with open("/tmp/data.json", "r", encoding="utf-8") as f:
@@ -136,5 +138,5 @@ html_content = f"""
136
  </html>
137
  """
138
 
139
- with open("/mnt/data/OSINT_Report.html", "w", encoding="utf-8") as f:
140
  f.write(html_content)
 
5
  import networkx as nx
6
 
7
  # Ensure /mnt/data exists
8
+ # Define safe output directory
9
  output_dir = "/mnt/data"
10
+ if not os.path.exists(output_dir):
11
+ output_dir = "/tmp"
12
 
13
  # Load JSON
14
  with open("/tmp/data.json", "r", encoding="utf-8") as f:
 
138
  </html>
139
  """
140
 
141
+ with open(html_output, "w", encoding="utf-8") as f:
142
  f.write(html_content)