[PATCH 1/3] xmlrpc: Remove 'bundle_to_dict'

Stephen Finucane stephen at that.guru
Fri Mar 24 00:24:59 AEDT 2017


Turns out this function is not called anywhere nor has it been called
since being introduced in '83964878'. Given that we're now focused on
the REST API, we can simply remove this.

Signed-off-by: Stephen Finucane <stephen at that.guru>
Cc: Daniel Axtens <dja at axtens.net>
---
 patchwork/views/xmlrpc.py | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/patchwork/views/xmlrpc.py b/patchwork/views/xmlrpc.py
index bb8b729..ae60404 100644
--- a/patchwork/views/xmlrpc.py
+++ b/patchwork/views/xmlrpc.py
@@ -291,33 +291,6 @@ def patch_to_dict(obj):
     }
 
 
-def bundle_to_dict(obj):
-    """Serialize a bundle object.
-
-    Return a trimmed down dictionary representation of a Bundle
-    object which is safe to send to the client. For example:
-
-    {
-        'id': 1,
-        'name': 'New',
-        'n_patches': 2,
-        'public_url': 'http://patchwork.example.com/bundle/admin/stuff/mbox/',
-    }
-
-    Args:
-        Bundle object to serialize.
-
-    Returns:
-        Serialized Bundle object.
-    """
-    return {
-        'id': obj.id,
-        'name': obj.name,
-        'n_patches': obj.patches.count(),
-        'public_url': obj.get_mbox_url(),
-    }
-
-
 def state_to_dict(obj):
     """Serialize a state object.
 
-- 
2.9.3



More information about the Patchwork mailing list