diff --git a/tests/send_CAP_as_message.py b/tests/send_CAP_as_message.py index df052c738..5abfd9fcf 100644 --- a/tests/send_CAP_as_message.py +++ b/tests/send_CAP_as_message.py @@ -12,7 +12,9 @@ # create a message containing the CAP alert in # the data field as base64 encoded bytes -data = base64.b64encode(open(filename, 'rb').read()).decode() +with open(filename, 'rb') as file: + data = base64.b64encode(file.read()).decode() + msg = { 'metadata_id': 'urn:wmo:md:int_wmo_test:cap', 'data': data, diff --git a/wis2box-management/wis2box/__init__.py b/wis2box-management/wis2box/__init__.py index 2c8dd3f7c..fa8a2f531 100644 --- a/wis2box-management/wis2box/__init__.py +++ b/wis2box-management/wis2box/__init__.py @@ -19,7 +19,7 @@ # ############################################################################### -__version__ = '1.0b8-dev' +__version__ = '1.0b7' import click diff --git a/wis2box-management/wis2box/data/cap_message.py b/wis2box-management/wis2box/data/cap_message.py index f660467a7..a64526d17 100644 --- a/wis2box-management/wis2box/data/cap_message.py +++ b/wis2box-management/wis2box/data/cap_message.py @@ -19,15 +19,15 @@ # ############################################################################### +from datetime import datetime import logging - from pathlib import Path -from datetime import datetime from typing import Union -from wis2box.data.base import BaseAbstractData from capvalidator import validate_cap_message, get_dates +from wis2box.data.base import BaseAbstractData + LOGGER = logging.getLogger(__name__)