import requests.adapters


class BaseHTTPAdapter(requests.adapters.HTTPAdapter):
    def close(self):
        self.pools.clear()

import requests.adapters


class BaseHTTPAdapter(requests.adapters.HTTPAdapter):
    def close(self):
        super(BaseHTTPAdapter, self).close()
        if hasattr(self, 'pools'):
            self.pools.clear()

Fix BaseHTTPAdapter for the SSL case
Fix BaseHTTPAdapter for the SSL case

Signed-off-by: Ulysses Souza <a0ff1337c6a0e43e9559f5f67fc3acb852912071@docker.com>

  import requests.adapters
  
  
  class BaseHTTPAdapter(requests.adapters.HTTPAdapter):
      def close(self):
+         super(BaseHTTPAdapter, self).close()
+         if hasattr(self, 'pools'):
-         self.pools.clear()
+             self.pools.clear()
  
Fix BaseHTTPAdapter for the SSL case
## Code Before:
import requests.adapters


class BaseHTTPAdapter(requests.adapters.HTTPAdapter):
    def close(self):
        self.pools.clear()

## Instruction:
Fix BaseHTTPAdapter for the SSL case
## Code After:
import requests.adapters


class BaseHTTPAdapter(requests.adapters.HTTPAdapter):
    def close(self):
        super(BaseHTTPAdapter, self).close()
        if hasattr(self, 'pools'):
            self.pools.clear()
