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:
parent
c420d5ef06
commit
455a173481
1
NEWS
1
NEWS
@ -12,6 +12,7 @@
|
||||
* 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 '.'
|
||||
for all osc commands. Feedback welcome.
|
||||
- support http proxies when using python 2.6 or newer (#551004)
|
||||
#
|
||||
# Features which require OBS 1.7
|
||||
#
|
||||
|
15
osc/conf.py
15
osc/conf.py
@ -317,14 +317,13 @@ def init_basicauth(config):
|
||||
|
||||
global cookiejar
|
||||
|
||||
# HTTPS proxy is not supported by urllib2. It only leads to an error
|
||||
# or, at best, a warning.
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=214983
|
||||
# https://bugzilla.novell.com/show_bug.cgi?id=298378
|
||||
if 'https_proxy' in os.environ:
|
||||
del os.environ['https_proxy']
|
||||
if 'HTTPS_PROXY' in os.environ:
|
||||
del os.environ['HTTPS_PROXY']
|
||||
if sys.version_info < (2, 6):
|
||||
# HTTPS proxy is not supported in old urllib2. It only leads to an error
|
||||
# or, at best, a warning.
|
||||
if 'https_proxy' in os.environ:
|
||||
del os.environ['https_proxy']
|
||||
if 'HTTPS_PROXY' in os.environ:
|
||||
del os.environ['HTTPS_PROXY']
|
||||
|
||||
if config['http_debug']:
|
||||
# brute force
|
||||
|
Loading…
Reference in New Issue
Block a user