From c5cbec20d2785d3060d57b55a264fbf936709500 Mon Sep 17 00:00:00 2001 From: termie Date: Thu, 24 Mar 2011 13:20:15 -0700 Subject: [PATCH] pep8 cleanups --- bin/nova-direct-api | 1 - nova/api/direct.py | 3 ++- nova/api/ec2/cloud.py | 4 +++- nova/tests/test_direct.py | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/nova-direct-api b/bin/nova-direct-api index bb3aa8ae7645..83ec727225b4 100755 --- a/bin/nova-direct-api +++ b/bin/nova-direct-api @@ -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): diff --git a/nova/api/direct.py b/nova/api/direct.py index bb2ace1c9904..e5f33cee444a 100644 --- a/nova/api/direct.py +++ b/nova/api/direct.py @@ -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): diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index 5d31d71d396e..0da64231861f 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -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): diff --git a/nova/tests/test_direct.py b/nova/tests/test_direct.py index 38384023482d..588a24b352ac 100644 --- a/nova/tests/test_direct.py +++ b/nova/tests/test_direct.py @@ -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}