- Timestamp:
- Apr 26, 2020, 5:02:25 PM (7 years ago)
- Branches:
- debian/bullseye, master
- Children:
- 62569d9
- Parents:
- 691c4ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnuboat/mapservice_impl/controllers/TilesController.py
r691c4ca rf9321aa 20 20 import os 21 21 22 from gnuboat. mapservice_impl.HttpErrors import (23 MapserviceInternalServerError, MapserviceBadRequest, MapserviceNotFound22 from gnuboat.common.webservice.HttpErrors import ( 23 GnuboatInternalServerError, GnuboatBadRequest, GnuboatNotFound 24 24 ) 25 25 … … 29 29 flask.current_app.config['TILES_CACHE_PATH'], os.R_OK 30 30 ): 31 raise MapserviceInternalServerError(31 raise GnuboatInternalServerError( 32 32 detail='TILES_CACHE_PATH not configured or not accessible' 33 33 ) … … 35 35 36 36 if 'TILES_DENSITIES' not in flask.current_app.config: 37 raise MapserviceInternalServerError(38 detail s='TILES_DENSITIES not configured'37 raise GnuboatInternalServerError( 38 detail='TILES_DENSITIES not configured' 39 39 ) 40 40 tiles_densities = flask.current_app.config['TILES_DENSITIES'] 41 41 42 42 if 'TILES_DENSITY_BASEE' not in flask.current_app.config: 43 raise MapserviceInternalServerError(44 detail s='TILES_DENSITY_BASEE not configured'43 raise GnuboatInternalServerError( 44 detail='TILES_DENSITY_BASEE not configured' 45 45 ) 46 46 tiles_densitiy_base = flask.current_app.config['TILES_DENSITY_BASEE'] 47 47 48 48 if 'TILES_SKIP_EMPTY' not in flask.current_app.config: 49 raise MapserviceInternalServerError(50 detail s='TILES_SKIP_EMPTY not configured'49 raise GnuboatInternalServerError( 50 detail='TILES_SKIP_EMPTY not configured' 51 51 ) 52 52 tiles_skip_empty = flask.current_app.config['TILES_SKIP_EMPTY'] … … 57 57 accuracy = '{}_{}'.format(min(tiles_densities), tiles_densitiy_base) 58 58 else: 59 raise MapserviceBadRequest(60 detail s=('No valid accuracy requested. '59 raise GnuboatBadRequest( 60 detail=('No valid accuracy requested. ' 61 61 'Valid are high, low. Requested was: {}') 62 62 .format(accuracy) … … 73 73 if not os.path.isfile(tile_path): 74 74 if not tiles_skip_empty or not os.path.isfile(tile__empty_path): 75 raise MapserviceNotFound(75 raise GnuboatNotFound( 76 76 detail=('Tile ({}, {}) for accuracy {} with resolution {} ' 77 77 'at zoomlevel {} not found')
Note:
See TracChangeset
for help on using the changeset viewer.
