aboutsummaryrefslogtreecommitdiffstats
path: root/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'common.py')
-rw-r--r--common.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/common.py b/common.py
index e4456af..44c8a53 100644
--- a/common.py
+++ b/common.py
@@ -7,10 +7,8 @@ from stat import S_ISDIR
from xdg.BaseDirectory import xdg_config_home
import logging
import yaml
-import __main__ as main
def load_config(path=None, groupnames=None):
- main_script = os.path.basename(main.__file__)
if path is None:
for p in [Path(),
Path(xdg_config_home).joinpath('webmap'),
@@ -36,14 +34,14 @@ def load_config(path=None, groupnames=None):
download = source.get('download', None)
if download is None:
url = None
- script = None
+ dl_module = None
elif isinstance(download, str):
url = download
- script = None
+ dl_module = None
source['download'] = download = { 'url': url }
else:
url = download.get('url', None)
- script = download.get('script', None)
+ dl_module = download.get('module', None)
if url is None:
urlp = None
else:
@@ -73,9 +71,9 @@ def load_config(path=None, groupnames=None):
cache = Path(cache)
source['cache']['path'] = cache
- v = { 'url': urlp, 'script': main_script if script is None else script }
+ v = { 'url': urlp, 'module': dl_module }
if cache in destinations and destinations[cache] != v:
- # allow destination conflicts, but only when the source URL and script match
+ # allow destination conflicts, but only when the source URL and module match
raise Exception(f'Destination conflict for layer "{name}"')
destinations[cache] = v