From 9ec5693608feb3db4bc14de8d327f9b524a80a14 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 30 Dec 2012 11:43:47 -0500 Subject: [PATCH] swc-installation-test-2.py: Don't print duplicate exceptions For example, if you have an outdated 'python', you only want to hear about that once, not once for each PythonPackageDependency. --- swc-installation-test-2.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/swc-installation-test-2.py b/swc-installation-test-2.py index f307e8a..3a1b9c4 100755 --- a/swc-installation-test-2.py +++ b/swc-installation-test-2.py @@ -97,9 +97,12 @@ def check(checks=None): _sys.stdout.write('pass\n') if failures: print('\nFailures:') + printed = [] for failure in failures: - print() - print(failure) + if failure not in printed: + print() + print(failure) + printed.append(failure) return False return True -- 2.26.2