diff --git a/.flake8 b/.flake8 index e3b2ecf825..9eaa903f47 100644 --- a/.flake8 +++ b/.flake8 @@ -97,7 +97,7 @@ per-file-ignores = scripts/db.out.ogr/db.out.ogr.py: F841 scripts/g.extension/g.extension.py: F841, E722, E501 scripts/v.unpack/v.unpack.py: E722, E501 - scripts/v.import/v.import.py: E722, E501 + scripts/v.import/v.import.py: E501 scripts/db.univar/db.univar.py: E501 scripts/d.frame/d.frame.py: E722 scripts/i.pansharpen/i.pansharpen.py: E501 diff --git a/scripts/v.import/v.import.py b/scripts/v.import/v.import.py index 4f579c4bf4..1e467cd190 100755 --- a/scripts/v.import/v.import.py +++ b/scripts/v.import/v.import.py @@ -263,7 +263,7 @@ def main(): if OGRdatasource.lower().endswith("gml"): try: from osgeo import gdal - except: + except ImportError: gs.fatal( _( "Unable to load GDAL Python bindings (requires package " @@ -338,7 +338,7 @@ def main(): if OGRdatasource.lower().endswith("gml"): try: from osgeo import gdal - except: + except ImportError: gs.fatal( _( "Unable to load GDAL Python bindings (requires package "