diff --git a/Makefile b/Makefile index e3d141e13..c2c25a304 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ run-unit-tests: lint .tox tox -e py3 .PHONY: run-integration-tests -run-unit-tests: lint .tox +run-integration-tests: lint .tox tox -e integration .PHONY: run-all-tests diff --git a/juju/client/connection.py b/juju/client/connection.py index ff6d8ee6b..0e3d9ef0c 100644 --- a/juju/client/connection.py +++ b/juju/client/connection.py @@ -5,7 +5,6 @@ import json import logging import ssl -import signal import urllib.request import weakref from http.client import HTTPSConnection @@ -425,10 +424,6 @@ def _exit_tasks(): for task in jasyncio.all_tasks(): task.cancel() - loop = jasyncio.get_running_loop() - for sig in (signal.SIGINT, signal.SIGTERM): - loop.add_signal_handler(sig, _exit_tasks) - return (await websockets.connect( url, ssl=self._get_ssl(cacert), @@ -473,11 +468,6 @@ async def close(self, to_reconnect=False): if self.proxy is not None: self.proxy.close() - # Remove signal handlers - loop = jasyncio.get_running_loop() - for sig in (signal.SIGINT, signal.SIGTERM): - loop.remove_signal_handler(sig) - async def _recv(self, request_id): if not self.is_open: raise websockets.exceptions.ConnectionClosed(0, 'websocket closed')