File tree 1 file changed +3
-4
lines changed
1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 5
5
import logging
6
6
import sys
7
7
import uuid
8
+ from pathlib import PurePath
8
9
from typing import Any
9
10
10
11
from networkx import DiGraph
@@ -74,9 +75,7 @@ def convert_spdx_to_opossum_information(filename: str) -> OpossumFileContent:
74
75
75
76
def convert_tree_to_opossum (tree : DiGraph ) -> Opossum :
76
77
metadata = create_metadata (tree )
77
- resources = [] # Resource(type=ResourceType.TOP_LEVEL)
78
- # resources_to_attributions: dict[str, list[str]] = dict()
79
- # external_attributions: dict[str, OpossumPackage] = dict()
78
+ resources = []
80
79
attribution_to_id : dict [OpossumPackage , str ] = {}
81
80
attribution_breakpoints = []
82
81
external_attribution_sources = {
@@ -98,7 +97,7 @@ def convert_tree_to_opossum(tree: DiGraph) -> Opossum:
98
97
"A tree should always have a node without incoming edge."
99
98
)
100
99
source_file_path = _get_file_path (connected_subgraph , source , source )
101
- rootnode = Resource (path = source_file_path )
100
+ rootnode = Resource (path = PurePath ( source_file_path ) )
102
101
resources .append (rootnode )
103
102
for node_label in connected_subgraph .nodes ():
104
103
node = connected_subgraph .nodes [node_label ]
You can’t perform that action at this time.
0 commit comments