← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/where-would-we-be-without-lint into lp:maas

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/where-would-we-be-without-lint into lp:maas.

Commit message:
Lint.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jtv/maas/where-would-we-be-without-lint/+merge/131571
-- 
https://code.launchpad.net/~jtv/maas/where-would-we-be-without-lint/+merge/131571
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/maas/where-would-we-be-without-lint into lp:maas.
=== modified file 'src/maasserver/api.py'
--- src/maasserver/api.py	2012-10-26 08:32:22 +0000
+++ src/maasserver/api.py	2012-10-26 10:29:24 +0000
@@ -1576,7 +1576,8 @@
         definition = request.data.get('definition', None)
         if definition is not None and tag.definition != definition:
             return HttpResponse(
-                "Definition supplied '%s' doesn't match current definition '%s'"
+                "Definition supplied '%s' "
+                "doesn't match current definition '%s'"
                 % (definition, tag.definition),
                 status=httplib.CONFLICT)
         nodes_to_add = self._get_nodes_for(request, 'add', nodegroup)

=== modified file 'src/maasserver/tests/test_api.py'
--- src/maasserver/tests/test_api.py	2012-10-26 08:32:22 +0000
+++ src/maasserver/tests/test_api.py	2012-10-26 10:29:24 +0000
@@ -4163,6 +4163,7 @@
         client = make_worker_client(nodegroup)
         image = make_boot_image_params()
         response = self.report_images(nodegroup, [image], client=client)
+        self.assertEqual(httplib.OK, response.status_code)
         self.assertEqual(0, recorder.call_count)
 
     def test_report_boot_images_removes_warning_if_images_found(self):

=== modified file 'src/provisioningserver/tags.py'
--- src/provisioningserver/tags.py	2012-10-24 16:29:02 +0000
+++ src/provisioningserver/tags.py	2012-10-26 10:29:24 +0000
@@ -160,8 +160,8 @@
     return matched_nodes, unmatched_nodes
 
 
-def process_all(client, tag_name, tag_definition, nodegroup_uuid, system_ids, xpath,
-                batch_size=None):
+def process_all(client, tag_name, tag_definition, nodegroup_uuid, system_ids,
+                xpath, batch_size=None):
     if batch_size is None:
         batch_size = DEFAULT_BATCH_SIZE
     all_matched = []
@@ -184,7 +184,8 @@
     # This also allows us to track if a nodegroup has been processed in the DB,
     # without having to add another API call.
     post_updated_nodes(
-        client, tag_name, tag_definition, nodegroup_uuid, all_matched, all_unmatched)
+        client, tag_name, tag_definition, nodegroup_uuid, all_matched,
+        all_unmatched)
 
 
 def process_node_tags(tag_name, tag_definition, batch_size=None):
@@ -205,5 +206,6 @@
     xpath = etree.XPath(tag_definition)
     # Get nodes to process
     system_ids = get_nodes_for_node_group(client, nodegroup_uuid)
-    process_all(client, tag_name, tag_definition, nodegroup_uuid, system_ids, xpath,
-                batch_size=batch_size)
+    process_all(
+        client, tag_name, tag_definition, nodegroup_uuid, system_ids, xpath,
+        batch_size=batch_size)