From: Pete Vander Giessen Date: Mon, 30 Jan 2017 15:09:36 +0000 (-0500) Subject: Simplified call to run_in_exector X-Git-Tag: 0.2.0~1^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=a658966b4a92191098770bf409edda84782d07cd;p=osm%2FN2VC.git Simplified call to run_in_exector ThreadPoolExecutor is the default, so we don't need to import it. --- 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)