Skip to content

Commit

Permalink
Async minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Muradyan committed Dec 5, 2022
1 parent eee3cfc commit 774dab8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ async def create_results_connection(self, search_id, offset, length):

return return_obj

def delete_query_connection(self, search_id):
async def delete_query_connection(self, search_id):
return_obj = dict()
return_obj['success'] = True
return return_obj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ def __init__(self, options, dialect, base_file_path=None, callback=None):
super().__init__(options, dialect, base_file_path, hash_type_lookup)

def translate_results(self, data_source, data):
results = data
for result in results:
for result in data:
if result.get('_raw'):
result['mime_type_raw'] = 'text/plain'

return super().translate_results(data_source, results)
return super().translate_results(data_source, data)
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, host, port=None, headers={}, url_modifier_function=None, cert
self.url_modifier_function = url_modifier_function
self.auth = auth

self.logger.error('Deprecated RestApiClient, consider using RestApiClientAsync')
self.logger.warning('Deprecated RestApiClient, consider using RestApiClientAsync')

# This method is used to set up an HTTP request and send it to the server
def call_api(self, endpoint, method, headers=None, data=None, urldata=None, timeout=None):
Expand Down

0 comments on commit 774dab8

Please sign in to comment.