diff --git a/ovsdbapp/backend/ovs_idl/connection.py b/ovsdbapp/backend/ovs_idl/connection.py index cfad90f4..c55ce227 100644 --- a/ovsdbapp/backend/ovs_idl/connection.py +++ b/ovsdbapp/backend/ovs_idl/connection.py @@ -89,7 +89,7 @@ class Connection(object): self.poller = poller.Poller() self.is_running = True self.thread = threading.Thread(target=self.run) - self.thread.setDaemon(True) + self.thread.daemon = True self.thread.start() def run(self): diff --git a/ovsdbapp/tests/unit/backend/ovs_idl/test_connection.py b/ovsdbapp/tests/unit/backend/ovs_idl/test_connection.py index a6291426..f0c445a3 100644 --- a/ovsdbapp/tests/unit/backend/ovs_idl/test_connection.py +++ b/ovsdbapp/tests/unit/backend/ovs_idl/test_connection.py @@ -41,7 +41,7 @@ class TestOVSNativeConnection(base.TestCase): mock_wait_for_change.assert_any_call(self.conn.idl, self.conn.timeout) mock_poller.assert_called_once_with() mock_thread.assert_called_once_with(target=self.conn.run) - mock_thread.return_value.setDaemon.assert_called_once_with(True) + self.assertIs(True, mock_thread.return_value.daemon) mock_thread.return_value.start.assert_called_once_with() def test_queue_txn(self, mock_thread):