Skip to content

Commit

Permalink
Fixing errors with tox config and pep8 errors
Browse files Browse the repository at this point in the history
Change-Id: Iddbd796457a4d3d9e53d5ad08273b6825fd44f5b
  • Loading branch information
John Bresnahan committed Sep 12, 2013
1 parent d0e6eec commit e11dcc6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions nova_plugin/staccato_nova_download/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def _wait_for_complete(self, xfer_id, headers):

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':
Expand All @@ -108,7 +108,8 @@ def download(self, context, url_parts, dst_file, metadata, **kwargs):
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)})
Expand All @@ -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()
Expand Down
1 change: 0 additions & 1 deletion staccato/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit e11dcc6

Please sign in to comment.