This just needs to be a list, not a dict.

This commit is contained in:
James Muscat 2015-07-01 22:27:12 +01:00
parent 13a651175d
commit 2d6e7d9f38
2 changed files with 5 additions and 5 deletions

View File

@ -131,7 +131,7 @@ def parse_and_error_handle(data):
return str(exc)
# Here we check if an outdated schema has been passed
if parsed_message["$schemaRef"] in Settings.GATEWAY_OUTDATED_SCHEMAS.keys():
if parsed_message["$schemaRef"] in Settings.GATEWAY_OUTDATED_SCHEMAS:
response.status = '426 Upgrade Required' # Bottle (and underlying httplib) don't know this one
statsCollector.tally("outdated")
return "FAIL: The schema you have used is no longer supported. Please check for an updated version of your application."

View File

@ -45,10 +45,10 @@ class _Settings(object):
"http://schemas.elite-markets.net/eddn/shipyard/1/test": "schemas/shipyard-v1.0.json"
}
GATEWAY_OUTDATED_SCHEMAS = {
"http://schemas.elite-markets.net/eddn/commodity/1": "schemas/commodity-v0.1.json",
"http://schemas.elite-markets.net/eddn/commodity/1/test": "schemas/commodity-v0.1.json"
}
GATEWAY_OUTDATED_SCHEMAS = [
"http://schemas.elite-markets.net/eddn/commodity/1",
"http://schemas.elite-markets.net/eddn/commodity/1/test"
]
###############################################################################
# Monitor settings