[GRASS-SVN] r67325 - grass/trunk/gui/wxpython/timeline

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 22 06:48:17 PST 2015


Author: annakrat
Date: 2015-12-22 06:48:17 -0800 (Tue, 22 Dec 2015)
New Revision: 67325

Modified:
   grass/trunk/gui/wxpython/timeline/frame.py
Log:
g.gui.timeline: show better error when dataset is empty

Modified: grass/trunk/gui/wxpython/timeline/frame.py
===================================================================
--- grass/trunk/gui/wxpython/timeline/frame.py	2015-12-22 14:37:38 UTC (rev 67324)
+++ grass/trunk/gui/wxpython/timeline/frame.py	2015-12-22 14:48:17 UTC (rev 67325)
@@ -204,8 +204,9 @@
 
             rows = sp.get_registered_maps(columns=columns, where=None,
                                           order='start_time', dbif=self.dbif)
-            if rows is None:
-                rows = []
+            if not rows:
+                GError(parent=self, message=_("Dataset <{name}> is empty").format(name=series[0] + '@' + series[1]))
+                return
             for row in rows:
                 mapName, start, end, north, south, west, east = row
                 self.timeData[name]['start_datetime'].append(start)



More information about the grass-commit mailing list