From 25ba1708d188293fa55f8fa029704ca5dbbf3b8b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 23 Mar 2017 13:24:59 +0000 Subject: [PATCH] xmlrpc: Remove 'bundle_to_dict' 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 --- patchwork/views/xmlrpc.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/patchwork/views/xmlrpc.py b/patchwork/views/xmlrpc.py index 0d438ef4..927ec9c2 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.47.3