mirror of
https://github.com/philippemerle/KubeDiagrams.git
synced 2026-08-16 14:16:14 +00:00
Fix a bug in generate_from_cluster()
This commit is contained in:
@@ -183,6 +183,7 @@ def generate_from_cluster(
|
||||
base_name = f"cluster-diagram-{uuid.uuid4().hex[:8]}"
|
||||
base_path = os.path.join(tempfile.gettempdir(), base_name)
|
||||
requested_output, png_output = FileManager.get_output_paths(base_path, output_format)
|
||||
dot_output = requested_output.replace(".dot_json", ".dot") if output_format == "dot_json" else None
|
||||
|
||||
cmd = ["kubectl-diagrams", resources_arg]
|
||||
|
||||
@@ -274,4 +275,4 @@ def generate_from_cluster(
|
||||
success=False,
|
||||
error=f"Unexpected error: {str(e)}",
|
||||
command=" ".join(cmd) or "kubectl-diagrams"
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user