]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Handle exception on Ctrl-C
authorroot <root@zbitter.fedora>
Tue, 17 Apr 2012 15:38:48 +0000 (17:38 +0200)
committerZane Bitter <zbitter@redhat.com>
Tue, 17 Apr 2012 15:38:48 +0000 (17:38 +0200)
Signed-off-by: Zane Bitter <zbitter@redhat.com>
heat/rpc/amqp.py

index c00849a3b0b55c895fbe4db0f2d7b907ecc98d2a..8585b591ff260ab12bfec2bc10743607f438d840 100644 (file)
@@ -60,7 +60,11 @@ class Pool(pools.Pool):
 
     def empty(self):
         while self.free_items:
-            self.get().close()
+            item = self.get()
+            try:
+                item.close()
+            except Exception:
+                pass
 
 
 class ConnectionContext(rpc_common.Connection):