projects
/
osm
/
N2VC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
efca423
)
Simplified call to run_in_exector
author
Pete Vander Giessen
<petevg@gmail.com>
Mon, 30 Jan 2017 15:09:36 +0000
(10:09 -0500)
committer
Pete Vander Giessen
<petevg@gmail.com>
Mon, 30 Jan 2017 15:09:36 +0000
(10:09 -0500)
ThreadPoolExecutor is the default, so we don't need to import it.
juju/utils.py
patch
|
blob
|
history
diff --git
a/juju/utils.py
b/juju/utils.py
index
78322e7
..
c3d7f23
100644
(file)
--- 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)