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

temporal lib: improved message if the are no maps in the request, wrong query or wrong period

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@73441 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi преди 6 години
родител
ревизия
1b8dd2ade8
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      lib/python/temporal/univar_statistics.py

+ 5 - 3
lib/python/temporal/univar_statistics.py

@@ -59,9 +59,11 @@ def print_gridded_dataset_univar_statistics(type, input, output, where, extended
 
     if not rows:
         dbif.close()
-        gscript.fatal(_("Space time %(sp)s dataset <%(i)s> is empty") % {
-                      'sp': sp.get_new_map_instance(None).get_type(),
-                      'i': sp.get_id()})
+        err = "Space time %(sp)s dataset <%(i)s> is empty"
+        if where:
+            err += " or where condition is wrong"
+        gscript.fatal(_(err) % {'sp': sp.get_new_map_instance(None).get_type(),
+                                'i': sp.get_id()})
 
     if no_header is False:
         string = ""