swc-installation-test-2.py: Don't print duplicate exceptions
authorW. Trevor King <wking@tremily.us>
Sun, 30 Dec 2012 16:43:47 +0000 (11:43 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 1 Jan 2013 14:49:46 +0000 (09:49 -0500)
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

index f307e8af8b7496710745f7e7009050c8c0341d8f..3a1b9c4299fca862ed02da8110cec5a9fbbfe19c 100755 (executable)
@@ -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