Skip to content

Commit

Permalink
Merge pull request #282 from mesosphere/proxy
Browse files Browse the repository at this point in the history
accept no_proxy env variable
  • Loading branch information
tamarrow committed Jul 20, 2015
2 parents bd18363 + 80168d6 commit acd23eb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
3 changes: 1 addition & 2 deletions dcos/http.py
Expand Up @@ -82,8 +82,7 @@ def request(method,

try:
with requests.Session() as session:
response = session.send(request.prepare(), timeout=timeout,
proxies=util.get_proxy_dict_from_env())
response = session.send(request.prepare(), timeout=timeout)
except Exception as ex:
raise to_exception(ex)

Expand Down
15 changes: 0 additions & 15 deletions dcos/util.py
Expand Up @@ -583,21 +583,6 @@ def stream(fn, objs):
yield job, jobs[job]


def get_proxy_dict_from_env():
""" Returns dict with proxy parameters
:returns: Dict with proxy parameters
:rtype: dict
"""

proxies = dict()

for name, value in os.environ.items():
if value and (name == 'http_proxy' or name == 'https_proxy'):
proxies[name] = value
return proxies


def get_ssh_options(config_file, options):
"""Returns the SSH arguments for the given parameters. Used by
commands that wrap SSH.
Expand Down

0 comments on commit acd23eb

Please sign in to comment.