grib2io
grib2io copied to clipboard
Problem in bitmap test ?
https://github.com/NOAA-MDL/grib2io/blob/f1643e3a84bc8d740481fd72ccef9a440c64220a/src/grib2io/_grib2io.py#L922 Shouldn't this line check that bitmap attribute is None ? The bitmap attribute may always exists as it is set to None in the post_init function https://github.com/NOAA-MDL/grib2io/blob/f1643e3a84bc8d740481fd72ccef9a440c64220a/src/grib2io/_grib2io.py#L716
The fix remove the bitmap attribute assignment and delete it when flush is called if it has been assigned
Thanks for reporting. It is the desire to always have bitmap
attribute to exist. It was an oversight to still use hasattr()
for the bitmap.
The file has been changed since my first patch : now, the line to change is : https://github.com/NOAA-MDL/grib2io/blob/master/src/grib2io/_grib2io.py#L928 with a check to None of the bitmap attribute.