IsNull("Block_1_0") | "Block_1_0" < 0))
try: gp.IsNull_sa(inRaster, isnull_raster) gp.ZonalStatisticsAsTable_sa(isnull_raster, "Value", isnull_raster, zonal_nodata_output) rows = gp.searchcursor(zonal_nodata_output,"VALUE>0","","SUM") rows = rows.next() rows = rows.getvalue("SUM") if rows >=1: print "error nodata cells exist" except: # If an error occurred while running a tool, then print the messages. print gp.GetMessages()