Python 3.11
This commit is contained in:
@@ -42,7 +42,7 @@ def download_menu(menu_params):
|
||||
'data': False
|
||||
}
|
||||
|
||||
request = requests.post(URL, params=params, json=body)
|
||||
request = requests.post(URL, params=params, json=body, timeout=30)
|
||||
|
||||
# urllib3 does not log response bodies - requests no longer supports it:
|
||||
# https://2.python-requests.org//en/master/api/#api-changes
|
||||
|
||||
@@ -30,14 +30,13 @@ if 'BASE_URL' in os.environ: # pragma: no cover
|
||||
if base_url.path:
|
||||
app.config['APPLICATION_ROOT'] = base_url.path
|
||||
|
||||
cache = ct.ttl.TTLCache(maxsize=30, ttl=CACHE_TIMEOUT)
|
||||
cache = ct.TTLCache(maxsize=30, ttl=CACHE_TIMEOUT)
|
||||
|
||||
|
||||
def canteen_not_found(config, canteen_name):
|
||||
log.warning('Canteen %s not found', canteen_name)
|
||||
configured = ', '.join("'{}'".format(c) for c in config.keys())
|
||||
message = "Canteen '{0}' not found, available: {1}".format(canteen_name,
|
||||
configured)
|
||||
configured = ', '.join(f"'{c}'" for c in config.keys())
|
||||
message = f"Canteen '{canteen_name}' not found, available: {configured}"
|
||||
return make_response(message, 404)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user