From 8a35e7fe5c890dcb648091f27d1f04b6a34c47dd Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Mon, 21 Oct 2024 17:57:02 -0400 Subject: [PATCH] fixed 722 --- .flake8 | 1 - scripts/r.in.srtm/r.in.srtm.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.flake8 b/.flake8 index 90686370f67..06a35d90c42 100644 --- a/.flake8 +++ b/.flake8 @@ -106,7 +106,6 @@ per-file-ignores = scripts/db.univar/db.univar.py: E501 scripts/d.frame/d.frame.py: E722 scripts/i.pansharpen/i.pansharpen.py: E722, E501 - scripts/r.in.srtm/r.in.srtm.py: E722 scripts/r.fillnulls/r.fillnulls.py: E722 scripts/d.rast.edit/d.rast.edit.py: E722 scripts/v.what.strds/v.what.strds.py: E501 diff --git a/scripts/r.in.srtm/r.in.srtm.py b/scripts/r.in.srtm/r.in.srtm.py index 1e4c585ac02..88864af4f5f 100755 --- a/scripts/r.in.srtm/r.in.srtm.py +++ b/scripts/r.in.srtm/r.in.srtm.py @@ -230,7 +230,7 @@ def main(): try: zf = zfile.ZipFile(zipfile) zf.extractall() - except: + except (zfile.BadZipfile, zfile.LargeZipFile, PermissionError): gs.fatal(_("Unable to unzip file.")) gs.message(_("Converting input file to BIL...")) @@ -277,7 +277,7 @@ def main(): try: gs.run_command("r.in.gdal", input=bilfile, out=tileout) - except: + except gs.CalledModuleError: gs.fatal(_("Unable to import data")) # nice color table