diff --git a/python/grass/grassdb/manage.py b/python/grass/grassdb/manage.py index 0446263615e..28c4a87555b 100644 --- a/python/grass/grassdb/manage.py +++ b/python/grass/grassdb/manage.py @@ -108,7 +108,7 @@ def split_mapset_path(mapset_path): """Split mapset path to three parts - grassdb, location, mapset""" mapset_path = Path(mapset_path) if len(mapset_path.parts) < 3: - ValueError( + raise ValueError( _("Mapset path '{}' needs at least three components").format(mapset_path) ) mapset = mapset_path.name diff --git a/scripts/g.extension/testsuite/test_addons_download.py b/scripts/g.extension/testsuite/test_addons_download.py index fd940bc39b0..e5077f9894e 100644 --- a/scripts/g.extension/testsuite/test_addons_download.py +++ b/scripts/g.extension/testsuite/test_addons_download.py @@ -51,7 +51,7 @@ def setUp(self): if self.install_prefix.exists(): files = list(path.name for path in self.install_prefix.iterdir()) if files: - RuntimeError( + raise RuntimeError( f"Install prefix path '{self.install_prefix}' \ contains files {','.join(files)}" ) diff --git a/scripts/g.extension/testsuite/test_addons_modules.py b/scripts/g.extension/testsuite/test_addons_modules.py index c7cedc84bb4..c1cab5c954a 100644 --- a/scripts/g.extension/testsuite/test_addons_modules.py +++ b/scripts/g.extension/testsuite/test_addons_modules.py @@ -80,7 +80,7 @@ def setUp(self): if os.path.exists(self.install_prefix): files = os.listdir(self.install_prefix) if files: - RuntimeError( + raise RuntimeError( "Install prefix path '{}' contains files {}".format( self.install_prefix, files )