Explorar o código

t.rast.mapcalc: TypeError: object of type 'NoneType' has no len() (fixes https://trac.osgeo.org/grass/ticket/3214)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@70002 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=8) %!d(string=hai) anos
pai
achega
08e9c3c39c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      lib/python/temporal/mapcalc.py

+ 1 - 1
lib/python/temporal/mapcalc.py

@@ -119,7 +119,7 @@ def dataset_mapcalculator(inputs, output, type, expression, base, method,
                                              dbif=dbif)
 
             # In case samples are not found
-            if not list and len(list) == 0:
+            if not list or len(list) == 0:
                 dbif.close()
                 msgr.message(_("No samples found for map calculation"))
                 return 0