Fixing errors with tox config and pep8 errors

Change-Id: Iddbd796457a4d3d9e53d5ad08273b6825fd44f5b
This commit is contained in:
John Bresnahan 2013-09-11 14:35:42 -10:00
parent d0e6eec885
commit e11dcc65ea
3 changed files with 7 additions and 6 deletions

View File

@ -93,7 +93,7 @@ class StaccatoTransfer(xfer_base.TransferBase):
def download(self, context, url_parts, dst_file, metadata, **kwargs):
LOG.info((_('Attemption to use %(module)s to download %(url)s')) %
{'module': unicode(self), 'url': url_parts.geturl()})
{'module': unicode(self), 'url': url_parts.geturl()})
headers = {'Content-Type': 'application/json'}
if CONF.auth_strategy == 'keystone':
@ -108,7 +108,8 @@ class StaccatoTransfer(xfer_base.TransferBase):
headers=headers, body=json.dumps(data))
response = self.client.getresponse()
if response.status != 200:
msg = _('Error requesting a new transfer %s. Status = %d') % (response.read(), response.status)
msg = (_('Error requesting a new transfer %s. Status = %d') %
(response.read(), response.status))
LOG.error(msg)
raise exception.ImageDownloadModuleError(
{'reason': msg, 'module': unicode(self)})
@ -132,7 +133,8 @@ def get_download_hander(**kwargs):
def get_schemes():
conf_group = CONF['staccato_nova_download_module']
try:
LOG.info("Staccato get_schemes(): %s:%s" % (conf_group.hostname, conf_group.port))
LOG.info(("Staccato get_schemes(): %s:%s" %
(conf_group.hostname, conf_group.port)))
client = httplib.HTTPConnection(conf_group.hostname, conf_group.port)
client.request('GET', '/')
response = client.getresponse()

View File

@ -48,7 +48,6 @@ class XferRequest(BASE, ModelBase):
executor_uuid = Column(String(512), nullable=True)
def register_models(engine):
models = (XferRequest,)
for model in models:

View File

@ -9,8 +9,8 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
NOSE_OPENSTACK_STDOUT=1
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = nosetests {posargs}
[tox:jenkins]