mirror of https://github.com/m-labs/artiq.git
tools: lazily import paramiko.
This commit is contained in:
parent
816ec6c52f
commit
6061393bd0
|
@ -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())
|
||||||
|
|
Loading…
Reference in New Issue