diff -Nru python-glanceclient-0.19.0/debian/changelog python-glanceclient-0.19.0/debian/changelog --- python-glanceclient-0.19.0/debian/changelog 2015-06-24 21:19:51.000000000 +0000 +++ python-glanceclient-0.19.0/debian/changelog 2015-07-10 10:42:02.000000000 +0000 @@ -1,3 +1,10 @@ +python-glanceclient (1:0.19.0-1ubuntu1) wily; urgency=medium + + * d/p/drop-to_bytes.patch: Drop byte conversion in call to SSL context + load_verify_locations as this breaks on older Python 3 versions. + + -- James Page Fri, 10 Jul 2015 11:41:32 +0100 + python-glanceclient (1:0.19.0-1) experimental; urgency=medium * New upstream release. diff -Nru python-glanceclient-0.19.0/debian/control python-glanceclient-0.19.0/debian/control --- python-glanceclient-0.19.0/debian/control 2015-06-24 21:19:51.000000000 +0000 +++ python-glanceclient-0.19.0/debian/control 2015-07-10 10:41:28.000000000 +0000 @@ -1,7 +1,8 @@ Source: python-glanceclient Section: python Priority: extra -Maintainer: PKG OpenStack +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: PKG OpenStack Uploaders: Corey Bryant , Thomas Goirand , Build-Depends: debhelper (>= 9), diff -Nru python-glanceclient-0.19.0/debian/patches/drop-to_bytes.patch python-glanceclient-0.19.0/debian/patches/drop-to_bytes.patch --- python-glanceclient-0.19.0/debian/patches/drop-to_bytes.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-glanceclient-0.19.0/debian/patches/drop-to_bytes.patch 2015-07-10 10:41:23.000000000 +0000 @@ -0,0 +1,45 @@ +From 4a4f7f3c445a3641bff9ae284b97c38d8fa097da Mon Sep 17 00:00:00 2001 +From: James Page +Date: Fri, 10 Jul 2015 11:30:18 +0100 +Subject: [PATCH] Drop byte conversion for loading CA certificates +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +The to_bytes conversion for the load_verify_locations call +is not required and causes issues on older Python versions: + +'Unable to load CA from "/«PKGBUILDDIR»/glanceclient/tests/unit/var/ca.crt" must be str or None, not bytes' + +Drop its use and just use the default str type provided. + +Change-Id: Iaa2278169301666546bf690c9b5bf93d274fadfa +--- + glanceclient/common/https.py | 9 +-------- + 1 file changed, 1 insertion(+), 8 deletions(-) + +--- a/glanceclient/common/https.py ++++ b/glanceclient/common/https.py +@@ -133,13 +133,6 @@ def host_matches_cert(host, x509): + raise exc.SSLCertificateError(msg) + + +-def to_bytes(s): +- if isinstance(s, six.string_types): +- return six.b(s) +- else: +- return s +- +- + class HTTPSAdapter(adapters.HTTPAdapter): + """ + This adapter will be used just when +@@ -325,7 +318,7 @@ class VerifiedHTTPSConnection(HTTPSConne + + if self.cacert: + try: +- self.context.load_verify_locations(to_bytes(self.cacert)) ++ self.context.load_verify_locations(self.cacert) + except Exception as e: + msg = 'Unable to load CA from "%s" %s' % (self.cacert, e) + raise exc.SSLConfigurationError(msg) diff -Nru python-glanceclient-0.19.0/debian/patches/series python-glanceclient-0.19.0/debian/patches/series --- python-glanceclient-0.19.0/debian/patches/series 2015-06-24 21:19:51.000000000 +0000 +++ python-glanceclient-0.19.0/debian/patches/series 2015-07-10 10:41:13.000000000 +0000 @@ -1,3 +1,4 @@ fix-test-shell.patch install-missing-files.patch fix-has-expired-tests.patch +drop-to_bytes.patch