use context stuff for fetching the ssh keys

This commit is contained in:
Michael Hudson-Doyle 2019-12-20 00:29:57 +13:00
parent 8fe1bffea1
commit 95a36eff56
1 changed files with 26 additions and 28 deletions

View File

@ -76,9 +76,7 @@ class SSHController(BaseController):
async def _fetch_ssh_keys(self, user_spec): async def _fetch_ssh_keys(self, user_spec):
ssh_import_id = "{ssh_import_id}:{import_username}".format(**user_spec) ssh_import_id = "{ssh_import_id}:{import_username}".format(**user_spec)
log.debug( with self.context.child("ssh_import_id", ssh_import_id):
"User input: %s, fetching ssh keys for %s",
user_spec, ssh_import_id)
try: try:
cp = await self.run_cmd_checked( cp = await self.run_cmd_checked(
['ssh-import-id', '-o-', ssh_import_id], ['ssh-import-id', '-o-', ssh_import_id],