When https_proxy is in the environment, output a warning and disable it as

urllib/urllib2 don't support it; see LP #122551.
This commit is contained in:
Loïc Minier 2008-08-18 13:27:20 +02:00
parent 2875772fa6
commit 3407655c52
2 changed files with 9 additions and 0 deletions

7
buildd
View File

@ -21,6 +21,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import os
import re
import sys
import urllib2
@ -80,6 +81,12 @@ elif op in ("retry", "rescore") and options.architecture:
else:
oneArch = False
# Clear https_proxy env var as it's not supported in urllib/urllib2; see
# LP #122551
if os.environ.has_key('https_proxy'):
print >> sys.stderr, "Ignoring https_proxy (no support in urllib/urllib2; see LP #122551)"
del os.environ['https_proxy']
# Prepare Launchpad cookie.
launchpadCookie = common.prepareLaunchpadCookie()
urlopener = common.setupLaunchpadUrlOpener(launchpadCookie)

2
debian/changelog vendored
View File

@ -2,6 +2,8 @@ ubuntu-dev-tools (0.40ubuntu4) UNRELEASED; urgency=low
* Replace .BB in doc/pbuilder-dist.1 with a newline to fix a syntax error.
* Drop spurious tab in buildd.
* When https_proxy is in the environment, output a warning and disable it as
urllib/urllib2 don't support it; see LP #122551.
-- Loic Minier <lool@dooz.org> Mon, 18 Aug 2008 12:21:58 +0200