[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:18 UTC 2011
The following commit has been merged in the debian branch:
commit 7eb61bdc82a9e12755a64373bd001303961db680
Author: Sebastian Krzyszkowiak <seba.dos1 at gmail.com>
Date: Thu Jul 9 20:41:24 2009 +0200
opimd: don't return private fields in GetContent
diff --git a/framework/subsystems/opimd/pimd_calls.py b/framework/subsystems/opimd/pimd_calls.py
index 26ca98c..a2528c5 100644
--- a/framework/subsystems/opimd/pimd_calls.py
+++ b/framework/subsystems/opimd/pimd_calls.py
@@ -293,11 +293,10 @@ class Call():
@return call data, in {Field_name:Field_value} notation"""
- # TODO Do not return private fields, such as the internal ID
fields = self.get_fields(self._field_idx)
content = {}
for field in fields:
- if fields[field]!='' and fields[field]!=None:
+ if fields[field]!='' and fields[field]!=None and not field.startswith('_'):
content[field] = fields[field]
return content
diff --git a/framework/subsystems/opimd/pimd_contacts.py b/framework/subsystems/opimd/pimd_contacts.py
index 0ca483c..e98615e 100644
--- a/framework/subsystems/opimd/pimd_contacts.py
+++ b/framework/subsystems/opimd/pimd_contacts.py
@@ -289,11 +289,10 @@ class Contact():
@return Contact data, in {Field_name:Field_value} notation"""
- # TODO Do not return private fields, such as the internal ID
fields = self.get_fields(self._field_idx)
content = {}
for field in fields:
- if fields[field]!='' and fields[field]!=None:
+ if fields[field]!='' and fields[field]!=None and not field.startswith('_'):
content[field] = fields[field]
return content
diff --git a/framework/subsystems/opimd/pimd_messages.py b/framework/subsystems/opimd/pimd_messages.py
index 00f8c3c..9940ee2 100644
--- a/framework/subsystems/opimd/pimd_messages.py
+++ b/framework/subsystems/opimd/pimd_messages.py
@@ -291,11 +291,10 @@ class Message():
@return Message data, in {Field_name:Field_value} notation"""
- # TODO Do not return private fields, such as the internal ID
fields = self.get_fields(self._field_idx)
content = {}
for field in fields:
- if fields[field]!='' and fields[field]!=None:
+ if fields[field]!='' and fields[field]!=None and not field.startswith('_'):
content[field] = fields[field]
return content
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list