From a7b8e62556f760a8a05fcfd92394517797376dea Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Thu, 24 May 2012 07:16:31 -0700 Subject: [PATCH] Lock pep8 at v1.1 Update offending files to pass pep8 v1.1 and lock our deps on this new version. Change-Id: I5380f213f8e2f62d75f513c8b4496f78fc692dad --- glance/common/auth.py | 2 +- glance/common/client.py | 4 ++-- tools/test-requires | 2 +- tox.ini | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/glance/common/auth.py b/glance/common/auth.py index 7c38426b76..b97a993c3d 100644 --- a/glance/common/auth.py +++ b/glance/common/auth.py @@ -133,7 +133,7 @@ class KeystoneStrategy(BaseStrategy): # 3. In some configurations nova makes redirection to # v2.0 keystone endpoint. Also, new location does not # contain real endpoint, only hostname and port. - if 'v2.0' not in auth_url: + if 'v2.0' not in auth_url: auth_url = urlparse.urljoin(auth_url, 'v2.0/') else: # If we sucessfully auth'd, then memorize the correct auth_url diff --git a/glance/common/client.py b/glance/common/client.py index 4d2ef97da9..a761a44205 100644 --- a/glance/common/client.py +++ b/glance/common/client.py @@ -599,9 +599,9 @@ class BaseClient(object): return (e.errno != errno.ESPIPE) def _sendable(self, body): - return (SENDFILE_SUPPORTED and + return (SENDFILE_SUPPORTED and hasattr(body, 'fileno') and - self._seekable(body) and + self._seekable(body) and not self.use_ssl) def _iterable(self, body): diff --git a/tools/test-requires b/tools/test-requires index 5ef9a943fc..752d68103e 100644 --- a/tools/test-requires +++ b/tools/test-requires @@ -10,6 +10,6 @@ nose nose-exclude nosexcover openstack.nose_plugin -pep8==0.6.1 +pep8==1.1 sphinx>=1.1.2 requests diff --git a/tox.ini b/tox.ini index 613cb893cc..f41f947829 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,7 @@ deps = -r{toxinidir}/tools/pip-requires commands = {toxinidir}/run_tests.sh -N [testenv:pep8] -deps = pep8==0.6.1 +deps = pep8==1.1 commands = pep8 --repeat --show-source bin glance setup.py [testenv:cover]