Browse Source

TGRASS: remove bogus band references error msg (#1435)

* TGRASS: remove bogus band references error msg

In `t.register` it must be possible to provide custom band names such as "mask", "ndvi", "prec", "temperature", etc. as per band reference definition.
Hence, the fatal error message `Error when registering strds: Unable to read band reference file` is incorrect.

This PR removes this incorrect error message, originating from #63.
Markus Neteler 4 years ago
parent
commit
c5051886fc
1 changed files with 2 additions and 7 deletions
  1. 2 7
      python/grass/temporal/space_time_datasets.py

+ 2 - 7
python/grass/temporal/space_time_datasets.py

@@ -352,7 +352,8 @@ class RasterDataset(AbstractMapDataset):
         set the internal band identifier that should be insert/updated
         in the temporal database.
 
-        :return: True if success, False on error
+        :return: True if success, False if band references could not be
+                 read (due to an error or because not being present)
         """
 
         check, band_ref = self.ciface.read_raster_band_reference(
@@ -360,12 +361,6 @@ class RasterDataset(AbstractMapDataset):
         )
 
         if check < 1:
-            self.msgr.error(
-                _(
-                    "Unable to read band reference file "
-                    "for raster map <%s>" % (self.get_map_id())
-                )
-            )
             return False
 
         self.metadata.set_band_reference(band_ref)