From 64c2ff01e434067d313ba365a763d4a184a7aa4d Mon Sep 17 00:00:00 2001 From: Arohan Ajit Date: Thu, 24 Oct 2024 09:20:39 -0400 Subject: [PATCH] fixed 722 --- .flake8 | 3 +-- gui/wxpython/photo2image/ip2i_manager.py | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.flake8 b/.flake8 index 7bc3070d15..e73cc6d94c 100644 --- a/.flake8 +++ b/.flake8 @@ -24,8 +24,7 @@ per-file-ignores = gui/scripts/d.wms.py: E501 gui/wxpython/image2target/g.gui.image2target.py: E501 gui/wxpython/nviz/*: E722 - gui/wxpython/photo2image/*: F841, E722, E265 - gui/wxpython/photo2image/g.gui.photo2image.py: E501, F841 + gui/wxpython/photo2image/g.gui.photo2image.py: E501 gui/wxpython/psmap/*: E501, E722 gui/wxpython/vdigit/*: F841, E722, F405, F403 gui/wxpython/animation/g.gui.animation.py: E501 diff --git a/gui/wxpython/photo2image/ip2i_manager.py b/gui/wxpython/photo2image/ip2i_manager.py index 711ec4191a..c8c5bbdc4d 100644 --- a/gui/wxpython/photo2image/ip2i_manager.py +++ b/gui/wxpython/photo2image/ip2i_manager.py @@ -43,6 +43,7 @@ from gui_core.mapdisp import FrameMixin from core.gcmd import RunCommand, GMessage, GError, GWarning from core.settings import UserSettings +from grass.exceptions import CalledModuleError from photo2image.ip2i_mapdisplay import MapPanel from gui_core.wrap import ( SpinCtrl, @@ -163,7 +164,7 @@ def __init__( if p.returncode == 0: print("returncode = ", str(p.returncode)) self.Map.region = self.Map.GetRegion() - except: + except CalledModuleError: pass self.SwitchEnv("source")