mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-26 03:38:25 +08:00
artiq_pcap: still grab the file if the command fails.
This commit is contained in:
parent
9e8bb1d51c
commit
3cf5cef168
@ -4,8 +4,8 @@
|
|||||||
# * tcpdump has CAP_NET_RAW capabilities set
|
# * tcpdump has CAP_NET_RAW capabilities set
|
||||||
# use # setcap cap_net_raw+eip /usr/sbin/tcpdump
|
# use # setcap cap_net_raw+eip /usr/sbin/tcpdump
|
||||||
|
|
||||||
import argparse
|
|
||||||
import os
|
import os
|
||||||
|
import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from artiq.tools import verbosity_args, init_logger, logger, SSHClient
|
from artiq.tools import verbosity_args, init_logger, logger, SSHClient
|
||||||
@ -49,7 +49,6 @@ def main():
|
|||||||
subprocess.check_call(args.command)
|
subprocess.check_call(args.command)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
logger.error("Command failed")
|
logger.error("Command failed")
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
tcpdump.close()
|
tcpdump.close()
|
||||||
sftp.get("{tmp}/trace.pcap".format(tmp=client.tmp),
|
sftp.get("{tmp}/trace.pcap".format(tmp=client.tmp),
|
||||||
|
Loading…
Reference in New Issue
Block a user