From: W. Trevor King Date: Sun, 30 Dec 2012 16:43:47 +0000 (-0500) Subject: swc-installation-test-2.py: Don't print duplicate exceptions X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9ec5693608feb3db4bc14de8d327f9b524a80a14;p=swc-workshop.git 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. --- 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