Rename function

main
Bob Mottram 2022-08-23 12:01:17 +01:00
parent de2da71381
commit b325afa070
2 changed files with 7 additions and 6 deletions

View File

@ -403,7 +403,7 @@ from crawlers import blocked_user_agent
from crawlers import load_known_web_bots
from qrcode import save_domain_qrcode
from importFollowing import run_import_following_watchdog
from maps import kml_from_tagmaps_path
from maps import map_format_from_tagmaps_path
import os
@ -17093,8 +17093,9 @@ class PubServer(BaseHTTPRequestHandler):
# hashtag map kml
if self.path.startswith('/tagmaps/') or \
(authorized and '/tagmaps/' in self.path):
map_str = kml_from_tagmaps_path(self.server.base_dir, self.path,
self.server.map_format)
map_str = \
map_format_from_tagmaps_path(self.server.base_dir, self.path,
self.server.map_format)
if map_str:
msg = map_str.encode('utf-8')
msglen = len(msg)

View File

@ -619,9 +619,9 @@ def _get_tagmaps_time_periods() -> {}:
}
def kml_from_tagmaps_path(base_dir: str, path: str,
map_format: str) -> str:
"""Returns kml for a given tagmaps path
def map_format_from_tagmaps_path(base_dir: str, path: str,
map_format: str) -> str:
"""Returns gpx/kml for a given tagmaps path
/tagmaps/tagname-time_period
"""
if '/tagmaps/' not in path: