TR_query() function signature matches TR_inspect()

`observable` is not being used in this function but `text_block` is so change the function signature of `TR_query()` to match `TR_inspect()` just below.  This resolves both the unused variable name `observable` and the undefined variable name `text_block`.

The user of this example will still need to define their own `TR_enrich()` function.
This commit is contained in:
Christian Clauss 2020-03-08 07:26:09 +01:00 committed by GitHub
parent a6286e28f5
commit 369155c276
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,13 +89,13 @@ def TR_check_auth(function, param):
return response return response
def TR_query(observable): def TR_query(text_block):
''' Pass the functions and parameters to check_auth to query the API ''' Pass the functions and parameters to check_auth to query the API
Return the final response Return the final response
''' '''
response = TR_check_auth(TR_inspect, text_block) response = TR_check_auth(TR_inspect, text_block)
inspect_output = response.text inspect_output = response.text
response = TR_check_auth(TR_enrich, inspect_output) response = TR_check_auth(TR_enrich, inspect_output) # TR_enrich() is undefined
return response return response
def TR_inspect(text_block): def TR_inspect(text_block):