1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-01-17 00:38:06 +00:00

fixed flask return statements

This commit is contained in:
checktheroads 2019-05-12 11:23:39 -07:00
parent acf21c89b7
commit 9a4a8cf65e
3 changed files with 2 additions and 2 deletions

View file

@ -140,7 +140,7 @@ def lg():
raise RuntimeError("Unable to add output to cache.", 415, *value_params)
# If 200, return output
if value_code == 200:
return cache.get(cache_key)
return Response(cache.get(cache_key))
# If 400 error, return error message and code
elif value_code in [405, 415]:
return Response(cache.get(cache_key), value_code)
@ -148,7 +148,7 @@ def lg():
else:
logger.info(f"Cache match for: {cache_key}, returning cached entry...")
try:
return cache.get(cache_key)
return Response(cache.get(cache_key))
except:
id = 4152
raise RuntimeError(