@@ -885,13 +885,21 @@ def __init__(self, config: Dict, playbook_compatible=False) -> None:
885885 "CONNECTOR_GRAYLOG_PORT" , ["connector" , "graylog_port" ], config , True , 12201
886886 )
887887 self .graylog_adapter = get_config_variable (
888- "CONNECTOR_GRAYLOG_ADAPTER" , ["connector" , "graylog_adapter" ], config , default = "udp"
888+ "CONNECTOR_GRAYLOG_ADAPTER" ,
889+ ["connector" , "graylog_adapter" ],
890+ config ,
891+ default = "udp" ,
889892 )
890893 self .log_shipping_level = get_config_variable (
891- "CONNECTOR_LOG_SHIPPING_LEVEL" , ["connector" , "log_shipping_level" ], config , default = "INFO"
894+ "CONNECTOR_LOG_SHIPPING_LEVEL" ,
895+ ["connector" , "log_shipping_level" ],
896+ config ,
897+ default = "INFO" ,
892898 ).upper ()
893899 self .log_shipping_env_var_prefix = get_config_variable (
894- "CONNECTOR_LOG_SHIPPING_ENV_VAR_PREFIX" , ["connector" , "log_shipping_env_var_prefix" ], config
900+ "CONNECTOR_LOG_SHIPPING_ENV_VAR_PREFIX" ,
901+ ["connector" , "log_shipping_env_var_prefix" ],
902+ config ,
895903 )
896904 self .connect_run_and_terminate = get_config_variable (
897905 "CONNECTOR_RUN_AND_TERMINATE" ,
@@ -1627,9 +1635,9 @@ def send_stix2_bundle(self, bundle: str, **kwargs) -> list:
16271635 )
16281636 )
16291637 else :
1630- octi_extensions ["granted_refs" ] = (
1631- self . enrichment_shared_organizations
1632- )
1638+ octi_extensions [
1639+ "granted_refs"
1640+ ] = self . enrichment_shared_organizations
16331641 else :
16341642 if item .get ("x_opencti_granted_refs" ) is not None :
16351643 item ["x_opencti_granted_refs" ] = list (
@@ -1639,9 +1647,9 @@ def send_stix2_bundle(self, bundle: str, **kwargs) -> list:
16391647 )
16401648 )
16411649 else :
1642- item ["x_opencti_granted_refs" ] = (
1643- self . enrichment_shared_organizations
1644- )
1650+ item [
1651+ "x_opencti_granted_refs"
1652+ ] = self . enrichment_shared_organizations
16451653 bundle = json .dumps (bundle_data )
16461654
16471655 # If execution in playbook, callback the api
@@ -1718,10 +1726,7 @@ def send_stix2_bundle(self, bundle: str, **kwargs) -> list:
17181726 os .rename (write_file , final_write_file )
17191727
17201728 stix2_splitter = OpenCTIStix2Splitter ()
1721- (
1722- expectations_number ,
1723- bundles ,
1724- ) = stix2_splitter .split_bundle_with_expectations (
1729+ (expectations_number , bundles ,) = stix2_splitter .split_bundle_with_expectations (
17251730 bundle = bundle ,
17261731 use_json = True ,
17271732 event_version = event_version ,
0 commit comments