mirror of
https://github.com/checktheroads/hyperglass
synced 2024-05-11 05:55:08 +00:00
fixed flask return statements
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -140,7 +140,7 @@ def lg():
|
|||||||
raise RuntimeError("Unable to add output to cache.", 415, *value_params)
|
raise RuntimeError("Unable to add output to cache.", 415, *value_params)
|
||||||
# If 200, return output
|
# If 200, return output
|
||||||
if value_code == 200:
|
if value_code == 200:
|
||||||
return cache.get(cache_key)
|
return Response(cache.get(cache_key))
|
||||||
# If 400 error, return error message and code
|
# If 400 error, return error message and code
|
||||||
elif value_code in [405, 415]:
|
elif value_code in [405, 415]:
|
||||||
return Response(cache.get(cache_key), value_code)
|
return Response(cache.get(cache_key), value_code)
|
||||||
@@ -148,7 +148,7 @@ def lg():
|
|||||||
else:
|
else:
|
||||||
logger.info(f"Cache match for: {cache_key}, returning cached entry...")
|
logger.info(f"Cache match for: {cache_key}, returning cached entry...")
|
||||||
try:
|
try:
|
||||||
return cache.get(cache_key)
|
return Response(cache.get(cache_key))
|
||||||
except:
|
except:
|
||||||
id = 4152
|
id = 4152
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
Reference in New Issue
Block a user