Преглед на файлове

t.rast.mapcalc: report no maps found on invalid band reference (#1844)

Co-authored-by: Markus Metz <33666869+metzm@users.noreply.github.com>
Martin Landa преди 3 години
родител
ревизия
f1f65a5a95
променени са 1 файла, в които са добавени 6 реда и са изтрити 2 реда
  1. 6 2
      python/grass/temporal/mapcalc.py

+ 6 - 2
python/grass/temporal/mapcalc.py

@@ -197,9 +197,13 @@ def dataset_mapcalculator(
         for dataset in input_list:
             list = dataset.get_registered_maps_as_objects(dbif=dbif)
 
-            if list is None:
+            if list is None or len(list) < 1:
                 dbif.close()
-                msgr.message(_("No maps registered in input dataset"))
+                msgr.message(
+                    _("No maps registered in input dataset <{}>").format(
+                        dataset.get_name()
+                    )
+                )
                 return 0
 
             map_name_list = []