log_remote removed
This commit is contained in:
parent
1b0adf3d02
commit
d2283dcc73
26
remote.py
26
remote.py
|
@ -1,10 +1,12 @@
|
|||
import os
|
||||
import queue
|
||||
import stat
|
||||
import subprocess
|
||||
import threading
|
||||
from itertools import product as itproduct
|
||||
from os.path import expanduser
|
||||
from pathlib import Path
|
||||
from subprocess import DEVNULL, STDOUT
|
||||
|
||||
import paramiko
|
||||
from tqdm import tqdm
|
||||
|
@ -209,27 +211,3 @@ def remote(detatch=False):
|
|||
_tlog.join()
|
||||
|
||||
ssh.close()
|
||||
|
||||
|
||||
def log_remote():
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.load_host_keys(known_hosts)
|
||||
ssh.connect(hostname=hostname, username=username)
|
||||
|
||||
sftp = ssh.open_sftp()
|
||||
sftp.get(str(__target_dir / "quacc.log"), str(Path(__log_file).absolute()))
|
||||
sftp.close()
|
||||
|
||||
q = queue.Queue()
|
||||
_tlog = threading.Thread(target=_echo_log, args=[ssh, q])
|
||||
_tlog.start()
|
||||
|
||||
try:
|
||||
input()
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
finally:
|
||||
q.put(None)
|
||||
|
||||
_tlog.join()
|
||||
ssh.close()
|
||||
|
|
Loading…
Reference in New Issue