forked from M-Labs/artiq
1
0
Fork 0

tools: lazily import paramiko.

This commit is contained in:
whitequark 2017-06-25 07:17:03 +00:00
parent 816ec6c52f
commit 6061393bd0
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,6 @@ import string
import random import random
import numpy as np import numpy as np
import paramiko
from artiq.language.environment import is_experiment from artiq.language.environment import is_experiment
from artiq.protocols import pyon from artiq.protocols import pyon
@ -269,6 +268,7 @@ class SSHClient:
def get_ssh(self): def get_ssh(self):
if self.ssh is None: if self.ssh is None:
import paramiko
self.ssh = paramiko.SSHClient() self.ssh = paramiko.SSHClient()
self.ssh.load_system_host_keys() self.ssh.load_system_host_keys()
self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())