pep8 cleanups
This commit is contained in:
parent
4a6db815b0
commit
c5cbec20d2
@ -52,7 +52,6 @@ flags.DEFINE_flag(flags.HelpshortFlag())
|
||||
flags.DEFINE_flag(flags.HelpXMLFlag())
|
||||
|
||||
|
||||
|
||||
# An example of an API that only exposes read-only methods.
|
||||
# In this case we're just limiting which methods are exposed.
|
||||
class ReadOnlyCompute(direct.Limited):
|
||||
|
@ -211,7 +211,8 @@ class ServiceWrapper(wsgi.Controller):
|
||||
try:
|
||||
return self._serialize(result, req.best_match_content_type())
|
||||
except:
|
||||
raise exception.Error("returned non-serializable type: %s" % result)
|
||||
raise exception.Error("returned non-serializable type: %s"
|
||||
% result)
|
||||
|
||||
|
||||
class Limited(object):
|
||||
|
@ -608,7 +608,9 @@ class CloudController(object):
|
||||
if field in kwargs:
|
||||
changes[field] = kwargs[field]
|
||||
if changes:
|
||||
self.volume_api.update(context, volume_id=volume_id, fields=changes)
|
||||
self.volume_api.update(context,
|
||||
volume_id=volume_id,
|
||||
fields=changes)
|
||||
return True
|
||||
|
||||
def attach_volume(self, context, volume_id, instance_id, device, **kwargs):
|
||||
|
@ -36,6 +36,7 @@ from nova.tests import test_cloud
|
||||
class ArbitraryObject(object):
|
||||
pass
|
||||
|
||||
|
||||
class FakeService(object):
|
||||
def echo(self, context, data):
|
||||
return {'data': data}
|
||||
|
Loading…
Reference in New Issue
Block a user