aboutsummaryrefslogtreecommitdiffstats
path: root/gis-observation-map
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2023-10-01 18:50:26 +0200
committerGuilhem Moulin <guilhem@fripost.org>2023-10-01 19:59:40 +0200
commit1d5ef7ed4c63c22ccceed392539ba785e85928cd (patch)
tree3414bf27ca4f0d1e9ceba116edefb91a08fb76e6 /gis-observation-map
parent75c75781566401a06ff8462910de38b7815d49cb (diff)
Change configuration format to .yml.
Diffstat (limited to 'gis-observation-map')
-rwxr-xr-xgis-observation-map6
1 files changed, 3 insertions, 3 deletions
diff --git a/gis-observation-map b/gis-observation-map
index a1ce006..c9de278 100755
--- a/gis-observation-map
+++ b/gis-observation-map
@@ -23,7 +23,7 @@ import sys
import json
import re
import requests
-import configparser
+import yaml
import tempfile
from datetime import datetime
from requests.exceptions import HTTPError
@@ -56,9 +56,9 @@ gpkg_drv = ogr.GetDriverByName('GPKG')
geojson_drv = ogr.GetDriverByName('GeoJSON')
programName = 'gis-observation-map'
+with Path(xdg_config_home()).joinpath(programName).joinpath('config.yml').open(mode='r') as fp:
+ config = yaml.load(fp, Loader=yaml.FullLoader)
-config = configparser.ConfigParser()
-config.read(Path(xdg_config_home()).joinpath(programName).joinpath('config'))
if 'QGIS' not in config.keys() or config['QGIS'] is None:
config['QGIS'] = {}