From 50a238daaba8feb6a1572dd1ec889103da11eae1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 24 Apr 2024 12:16:56 +0200 Subject: Adaptations vers Django version 2.2 --- chimere/route.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chimere/route.py') diff --git a/chimere/route.py b/chimere/route.py index f18fb37..569e9c2 100644 --- a/chimere/route.py +++ b/chimere/route.py @@ -30,7 +30,7 @@ import json from bs4 import BeautifulSoup from subprocess import Popen, PIPE from django.contrib.gis.gdal import DataSource -from django.contrib.gis.gdal.error import OGRException +from django.contrib.gis.gdal.error import GDALException from django.conf import settings @@ -83,7 +83,7 @@ class RoutinoRouter(Router): p.communicate() try: ds = DataSource(tmp_dir + 'shortest-track.gpx') - except OGRException: + except GDALException: return [], None, None if not ds: return [], None, None -- cgit v1.2.3