diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 231ac8c..024b854 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -111,39 +111,6 @@ jobs: - name: "Run tests" run: "make python_tests" - python-tests-code-coverage: - name: "Tests for Python code with code coverage" - runs-on: "${{ matrix.operating-system }}" - needs: ["python-tests"] - - strategy: - matrix: - python: ["3.9"] - operating-system: ["ubuntu-latest"] - - steps: - - name: "Checkout" - uses: "actions/checkout@v2" - - - name: "Set up Python ${{ matrix.python }}" - uses: "actions/setup-python@v1" - with: - python-version: ${{ matrix.python }} - - - name: "Install dependencies" - run: | - python -m pip install --upgrade pip - if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - - - name: "Install code coverage" - run: "pip install coverage" - - - name: "Run code coverage" - run: "make python_coverage" - - - name: "Report code coverage" - run: "coverage report" - test-install-python: name: "Test installation of Python distribution" runs-on: "${{ matrix.operating-system }}" diff --git a/fb_bus_connector_plugin/__init__.py b/fb_bus_connector_plugin/__init__.py index 396d797..0fc4928 100644 --- a/fb_bus_connector_plugin/__init__.py +++ b/fb_bus_connector_plugin/__init__.py @@ -16,4 +16,4 @@ FastyBird BUS connector module """ -__version__ = "0.1.2" +__version__ = "0.1.3" diff --git a/fb_bus_connector_plugin/clients/pjon.py b/fb_bus_connector_plugin/clients/pjon.py index e47cc51..748a85d 100644 --- a/fb_bus_connector_plugin/clients/pjon.py +++ b/fb_bus_connector_plugin/clients/pjon.py @@ -180,6 +180,9 @@ def send_packet(self, address: int, payload: List[int], waiting_time: float = 0. def handle(self) -> int: """Process clients""" + if not self.__state: + return 0 + try: result = self.loop() @@ -200,6 +203,9 @@ def handle(self) -> int: def receive(self, received_payload: bytes, length: int, packet_info: Dict) -> None: """Process received message by clients""" + if not self.__state: + return + sender_address: Optional[int] = None try: diff --git a/tests/pytests/__init__.py b/tests/pytests/__init__.py index 3acb7cf..1c7f241 100644 --- a/tests/pytests/__init__.py +++ b/tests/pytests/__init__.py @@ -13,5 +13,5 @@ # limitations under the License. """ -MQTT connector plugin tests +FastyBird BUS connector plugin tests """