MCPcopy Index your code
hub / github.com/docker/docker-py / get_environment

Method get_environment

docker/utils/proxy.py:40–54  ·  view source on GitHub ↗

Return a dictionary representing the environment variables used to set the proxy settings.

(self)

Source from the content-addressed store, hash-verified

38 )
39
40 def get_environment(self):
41 '''
42 Return a dictionary representing the environment variables used to
43 set the proxy settings.
44 '''
45 env = {}
46 if self.http:
47 env['http_proxy'] = env['HTTP_PROXY'] = self.http
48 if self.https:
49 env['https_proxy'] = env['HTTPS_PROXY'] = self.https
50 if self.ftp:
51 env['ftp_proxy'] = env['FTP_PROXY'] = self.ftp
52 if self.no_proxy:
53 env['no_proxy'] = env['NO_PROXY'] = self.no_proxy
54 return env
55
56 def inject_proxy_environment(self, environment):
57 '''

Callers 3

test_environmentMethod · 0.95
buildMethod · 0.80

Calls

no outgoing calls

Tested by 1

test_environmentMethod · 0.76