1212from stix2 .parsing import parse
1313
1414
15- def _add (store , stix_data , allow_custom = True , version = "2.1" ):
15+ def _add (sink , stix_data , allow_custom = True , version = "2.1" ):
1616 """Add STIX objects to MemoryStore/Sink.
1717
1818 Adds STIX objects to an in-memory dictionary for fast lookup.
@@ -32,12 +32,12 @@ def _add(store, stix_data, allow_custom=True, version="2.1"):
3232 if isinstance (stix_data , list ):
3333 # STIX objects are in a list- recurse on each object
3434 for stix_obj in stix_data :
35- _add (store , stix_obj , allow_custom , version )
35+ _add (sink , stix_obj , allow_custom , version )
3636
3737 elif stix_data ["type" ] == "bundle" :
3838 # adding a json bundle - so just grab STIX objects
3939 for stix_obj in stix_data .get ("objects" , []):
40- _add (store , stix_obj , allow_custom , version )
40+ _add (sink , stix_obj , allow_custom , version )
4141
4242 else :
4343 # Adding a single non-bundle object
@@ -46,7 +46,7 @@ def _add(store, stix_data, allow_custom=True, version="2.1"):
4646 else :
4747 stix_obj = parse (stix_data , allow_custom , version )
4848
49- store .insert_object (stix_obj )
49+ sink .insert_object (stix_obj )
5050
5151
5252class RelationalDBStore (DataStoreMixin ):
0 commit comments