mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +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.
|
* 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
|
||||||
#
|
#
|
||||||
|
15
osc/conf.py
15
osc/conf.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user