hughesjr / rpms / docker

Forked from rpms/docker 4 years ago
Clone

Blame SOURCES/docker-py-remove-lock.patch

e34f9a
From cb75275827e762a716a15459bb540a423f1fed3c Mon Sep 17 00:00:00 2001
b215bf
From: Lokesh Mandvekar <lsm5@fedoraproject.org>
e34f9a
Date: Wed, 8 Jul 2015 12:04:17 -0500
e34f9a
Subject: [PATCH] remove lock
e34f9a
e34f9a
atomic doesn't work on rhel without this :(
b215bf
b215bf
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
b215bf
---
b215bf
 docker/unixconn/unixconn.py | 17 ++++++++---------
b215bf
 1 file changed, 8 insertions(+), 9 deletions(-)
b215bf
b215bf
diff --git a/docker/unixconn/unixconn.py b/docker/unixconn/unixconn.py
e34f9a
index 551bd29..4c4c8e5 100644
b215bf
--- a/docker/unixconn/unixconn.py
b215bf
+++ b/docker/unixconn/unixconn.py
e34f9a
@@ -68,15 +68,14 @@ class UnixAdapter(requests.adapters.HTTPAdapter):
b215bf
         super(UnixAdapter, self).__init__()
b215bf
e34f9a
     def get_connection(self, url, proxies=None):
b215bf
-        with self.pools.lock:
e34f9a
-            pool = self.pools.get(url)
b215bf
-            if pool:
b215bf
-                return pool
b215bf
-
e34f9a
-            pool = UnixHTTPConnectionPool(url,
e34f9a
-                                          self.socket_path,
e34f9a
-                                          self.timeout)
e34f9a
-            self.pools[url] = pool
e34f9a
+        pool = self.pools.get(url)
b215bf
+        if pool:
b215bf
+            return pool
b215bf
+
e34f9a
+        pool = UnixHTTPConnectionPool(url,
e34f9a
+                                      self.socket_path,
e34f9a
+                                      self.timeout)
e34f9a
+        self.pools[url] = pool
b215bf
b215bf
         return pool
b215bf
b215bf
-- 
e34f9a
2.4.5
b215bf