Modify logger to ignore trimesh warnings and update geometry helper to stop call to NRCAN website
This commit is contained in:
parent
63b91c4d67
commit
2f704fbe4f
|
@ -240,6 +240,7 @@ class GeometryHelper:
|
||||||
"""
|
"""
|
||||||
Get Location from latitude and longitude
|
Get Location from latitude and longitude
|
||||||
"""
|
"""
|
||||||
|
return Location('ca', 'montreal')
|
||||||
url = 'https://nominatim.openstreetmap.org/reverse?lat={latitude}&lon={longitude}&format=json'
|
url = 'https://nominatim.openstreetmap.org/reverse?lat={latitude}&lon={longitude}&format=json'
|
||||||
response = requests.get(url.format(latitude=latitude, longitude=longitude))
|
response = requests.get(url.format(latitude=latitude, longitude=longitude))
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
|
|
|
@ -2,6 +2,9 @@ import logging as logger
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
log = logger.getLogger("trimesh")
|
||||||
|
log.setLevel(logger.ERROR)
|
||||||
|
|
||||||
log_dir = (Path(__file__).parent.parent / 'logs').resolve()
|
log_dir = (Path(__file__).parent.parent / 'logs').resolve()
|
||||||
log_file = (log_dir / 'hub.log').resolve()
|
log_file = (log_dir / 'hub.log').resolve()
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user