From 6ed9edf191b4d22449fe1c83af52a679e6288717 Mon Sep 17 00:00:00 2001 From: Paul Bienkowski Date: Sat, 27 Nov 2021 20:15:36 +0100 Subject: [PATCH] Formatting and remove debug prints --- api/obs/api/app.py | 4 ++-- api/obs/api/routes/tiles.py | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/api/obs/api/app.py b/api/obs/api/app.py index 8ceef73..08901a7 100644 --- a/api/obs/api/app.py +++ b/api/obs/api/app.py @@ -157,7 +157,7 @@ if INDEX_HTML and exists(INDEX_HTML): @app.get("/config.json") def get_frontend_config(req): base_path = req.server_path.replace("config.json", "") - scheme = 'https' if req.app.config.FRONTEND_HTTPS else req.scheme + scheme = "https" if req.app.config.FRONTEND_HTTPS else req.scheme result = { **req.app.config.FRONTEND_CONFIG, "apiUrl": f"{scheme}://{req.host}{base_path}api", @@ -172,7 +172,7 @@ if INDEX_HTML and exists(INDEX_HTML): ], "minzoom": 12, "maxzoom": 14, - } + }, } return json_response(result) diff --git a/api/obs/api/routes/tiles.py b/api/obs/api/routes/tiles.py index 1fa19a0..4989b81 100644 --- a/api/obs/api/routes/tiles.py +++ b/api/obs/api/routes/tiles.py @@ -14,13 +14,11 @@ def get_tile(filename, zoom, x, y): https://github.com/TileStache/TileStache/blob/master/TileStache/MBTiles.py """ - print(filename) db = connect(filename) db.text_factory = bytes fmt = db.execute("SELECT value FROM metadata WHERE name='format'").fetchone()[0] if fmt != b"pbf": - print(repr(b"pbf"), " versus ", repr(fmt)) raise ValueError("mbtiles file is in wrong format: %s" % fmt) content = db.execute( @@ -51,7 +49,6 @@ async def tiles(req, zoom: int, x: int, y: str): y=int(y), ) ) - print("TILE", tile) gzip = "gzip" in req.headers["accept-encoding"]