aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo_gsm_tester
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-07-13 19:13:52 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-07-13 19:13:55 +0200
commit03fab0922e6a1e0968836157fdcfd69ee67d4294 (patch)
tree7d4cc75ef0c777a98d41e7d843a7705573061b34 /src/osmo_gsm_tester
parent6b9a50e2e12423e2a3f5181bf24294d1297d7ab7 (diff)
iperf3: server: Avoid copying logfile during cleanup if already copied previously
Diffstat (limited to 'src/osmo_gsm_tester')
-rw-r--r--src/osmo_gsm_tester/obj/iperf3.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo_gsm_tester/obj/iperf3.py b/src/osmo_gsm_tester/obj/iperf3.py
index 9e084aa..252c55a 100644
--- a/src/osmo_gsm_tester/obj/iperf3.py
+++ b/src/osmo_gsm_tester/obj/iperf3.py
@@ -101,11 +101,12 @@ class IPerf3Server(log.Origin):
def cleanup(self):
if self.process is None:
return
- if self.runs_locally() or not self.logfile_supported:
+ if self.runs_locally() or not self.logfile_supported or self.log_copied:
return
# copy back files (may not exist, for instance if there was an early error of process):
try:
self.rem_host.scpfrom('scp-back-log', self.remote_log_file, self.log_file)
+ self.log_copied = True
except Exception as e:
self.log(repr(e))