Strips hostname from extra http if present in string to prevent failures in low level Python socket module

This commit is contained in:
Winterflower 2019-11-27 21:03:03 +01:00
parent ba1c932823
commit ce477021c1

View File

@ -5,7 +5,8 @@ import pandas as pd
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
# Define test files and indices
ELASTICSEARCH_HOST = os.environ.get('ELASTICSEARCH_HOST') or 'localhost' # TODO externalise this
ELASTICSEARCH_HOST = os.environ.get('ELASTICSEARCH_HOST') or 'localhost'
ELASTICSEARCH_HOST = ELASTICSEARCH_HOST.lstrip('http://')
FLIGHTS_INDEX_NAME = 'flights'
FLIGHTS_MAPPING = {"mappings": {