Do not allow thread exceptions to stop errors
authorStavros Sachtouris <saxtouri@admin.grnet.gr>
Thu, 1 Aug 2013 09:51:24 +0000 (12:51 +0300)
committerStavros Sachtouris <saxtouri@admin.grnet.gr>
Thu, 1 Aug 2013 09:51:24 +0000 (12:51 +0300)
kamaki/clients/pithos/__init__.py

index d010623..499a2c6 100644 (file)
@@ -442,9 +442,13 @@ class PithosClient(PithosRestClient):
                 else:
                     break
             if missing:
+                try:
+                    details = ['%s' % thread.exception for thread in missing]
+                except Exception:
+                    details = []
                 raise ClientError(
                     '%s blocks failed to upload' % len(missing),
-                    details=['%s' % thread.exception for thread in missing])
+                    details=details)
         except KeyboardInterrupt:
             sendlog.info('- - - wait for threads to finish')
             for thread in activethreads():