From a658966b4a92191098770bf409edda84782d07cd Mon Sep 17 00:00:00 2001 From: Pete Vander Giessen Date: Mon, 30 Jan 2017 10:09:36 -0500 Subject: [PATCH] Simplified call to run_in_exector ThreadPoolExecutor is the default, so we don't need to import it. --- juju/utils.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/juju/utils.py b/juju/utils.py index 78322e7..c3d7f23 100644 --- a/juju/utils.py +++ b/juju/utils.py @@ -1,5 +1,4 @@ import asyncio -import concurrent.futures import os from pathlib import Path @@ -45,8 +44,4 @@ async def read_ssh_key(loop): can be passed on to a model. ''' - ssh_key = await loop.run_in_executor( - concurrent.futures.ThreadPoolExecutor(), - _read_ssh_key - ) - return ssh_key + return await loop.run_in_executor(None, _read_ssh_key) -- 2.17.1