1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 09:56:13 +01:00

support http proxies when using python 2.6 or newer (#551004)

This commit is contained in:
Adrian Schröter 2009-10-29 17:17:39 +00:00
parent c420d5ef06
commit 455a173481
2 changed files with 8 additions and 8 deletions

1
NEWS
View File

@ -12,6 +12,7 @@
* Use 'osc ls /' if you really want to list all projects. * Use 'osc ls /' if you really want to list all projects.
* This is meant as a proof of concept. I intend to generalize this usage of '.' * This is meant as a proof of concept. I intend to generalize this usage of '.'
for all osc commands. Feedback welcome. for all osc commands. Feedback welcome.
- support http proxies when using python 2.6 or newer (#551004)
# #
# Features which require OBS 1.7 # Features which require OBS 1.7
# #

View File

@ -317,14 +317,13 @@ def init_basicauth(config):
global cookiejar global cookiejar
# HTTPS proxy is not supported by urllib2. It only leads to an error if sys.version_info < (2, 6):
# or, at best, a warning. # HTTPS proxy is not supported in old urllib2. It only leads to an error
# https://bugzilla.novell.com/show_bug.cgi?id=214983 # or, at best, a warning.
# https://bugzilla.novell.com/show_bug.cgi?id=298378 if 'https_proxy' in os.environ:
if 'https_proxy' in os.environ: del os.environ['https_proxy']
del os.environ['https_proxy'] if 'HTTPS_PROXY' in os.environ:
if 'HTTPS_PROXY' in os.environ: del os.environ['HTTPS_PROXY']
del os.environ['HTTPS_PROXY']
if config['http_debug']: if config['http_debug']:
# brute force # brute force