Explorar o código

wxGUI/timeline: fix case when there are no registered datasets

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60050 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová %!s(int64=11) %!d(string=hai) anos
pai
achega
d55a7c4c95
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      gui/wxpython/timeline/frame.py

+ 2 - 1
gui/wxpython/timeline/frame.py

@@ -393,7 +393,8 @@ class TimelineFrame(wx.Frame):
                      for etype, maps in etypesDict.iteritems()]
                     for mapset, etypesDict in tDict.iteritems()]
         # flatten this list
-        allDatasets = reduce(lambda x, y: x + y, reduce(lambda x, y: x + y, allDatasets))
+        if allDatasets:
+            allDatasets = reduce(lambda x, y: x + y, reduce(lambda x, y: x + y, allDatasets))
 
         for dataset in datasets:
             errorMsg = _("Space time dataset <%s> not found.") % dataset