[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819
Sebastian Krzyszkowiak
seba.dos1 at gmail.com
Sat Aug 6 08:17:17 UTC 2011
The following commit has been merged in the debian branch:
commit 851e0cd575dcc4d47b909b7e55c9350d8ffd8db5
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date: Thu Jul 9 16:39:10 2009 +0200
opimd: don't list empty fields in content
diff --git a/framework/subsystems/opimd/pimd_calls.py b/framework/subsystems/opimd/pimd_calls.py
index 71ec366..26ca98c 100644
--- a/framework/subsystems/opimd/pimd_calls.py
+++ b/framework/subsystems/opimd/pimd_calls.py
@@ -294,8 +294,12 @@ class Call():
@return call data, in {Field_name:Field_value} notation"""
# TODO Do not return private fields, such as the internal ID
- return self.get_fields(self._field_idx)
-
+ fields = self.get_fields(self._field_idx)
+ content = {}
+ for field in fields:
+ if fields[field]!='' and fields[field]!=None:
+ content[field] = fields[field]
+ return content
def attempt_merge(self, call_fields, backend_name):
"""Attempts to merge the given call into the call list and returns its ID
diff --git a/framework/subsystems/opimd/pimd_contacts.py b/framework/subsystems/opimd/pimd_contacts.py
index 027f34b..0ca483c 100644
--- a/framework/subsystems/opimd/pimd_contacts.py
+++ b/framework/subsystems/opimd/pimd_contacts.py
@@ -290,7 +290,12 @@ class Contact():
@return Contact data, in {Field_name:Field_value} notation"""
# TODO Do not return private fields, such as the internal ID
- return self.get_fields(self._field_idx)
+ fields = self.get_fields(self._field_idx)
+ content = {}
+ for field in fields:
+ if fields[field]!='' and fields[field]!=None:
+ content[field] = fields[field]
+ return content
def attempt_merge(self, contact_fields, backend_name):
diff --git a/framework/subsystems/opimd/pimd_messages.py b/framework/subsystems/opimd/pimd_messages.py
index fed63e1..00f8c3c 100644
--- a/framework/subsystems/opimd/pimd_messages.py
+++ b/framework/subsystems/opimd/pimd_messages.py
@@ -292,7 +292,13 @@ class Message():
@return Message data, in {Field_name:Field_value} notation"""
# TODO Do not return private fields, such as the internal ID
- return self.get_fields(self._field_idx)
+ fields = self.get_fields(self._field_idx)
+ content = {}
+ for field in fields:
+ if fields[field]!='' and fields[field]!=None:
+ content[field] = fields[field]
+ return content
+
def attempt_merge(self, message_fields, backend_name):
"""Attempts to merge the given message into the message list and returns its ID
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list