From 0bd73da4bb861a7215d35f93398dbfec3ee29966 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 16 May 2016 16:22:35 -0400 Subject: [PATCH] sshtunnels: Remove duplicate error strings spice can open multiple tunnels, and in certain cases we may get multiple duplicate errors from each tunnel. Try to strip them out --- virtManager/sshtunnels.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py index 62c74b2c..97865cda 100644 --- a/virtManager/sshtunnels.py +++ b/virtManager/sshtunnels.py @@ -283,10 +283,12 @@ class SSHTunnels(object): self.unlock() def get_err_output(self): - errout = "" + errstrings = [] for l in self._tunnels: - errout += l.get_err_output() - return errout + e = l.get_err_output().strip() + if e and e not in errstrings: + errstrings.append(e) + return "\n".join(errstrings) def _lock(self): _tunnel_scheduler.lock()