Commit e6299b55 authored by Nicolas Delaby's avatar Nicolas Delaby

Coding style only

 - remove blank spaces
 - wordwrap to 80 chars
 - typo


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35797 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 62e09538
...@@ -46,9 +46,9 @@ marshaller = Marshaller(namespace_uri=MARSHALLER_NAMESPACE_URI, ...@@ -46,9 +46,9 @@ marshaller = Marshaller(namespace_uri=MARSHALLER_NAMESPACE_URI,
as_tree=True).dumps as_tree=True).dumps
class OrderedPickler(Pickler): class OrderedPickler(Pickler):
dispatch = Pickler.dispatch.copy() dispatch = Pickler.dispatch.copy()
def save_dict(self, obj): def save_dict(self, obj):
write = self.write write = self.write
if self.bin: if self.bin:
...@@ -60,7 +60,7 @@ class OrderedPickler(Pickler): ...@@ -60,7 +60,7 @@ class OrderedPickler(Pickler):
key_list.sort() # Order keys key_list.sort() # Order keys
obj_items = map(lambda x: (x, obj[x]), key_list) # XXX Make it lazy in the future obj_items = map(lambda x: (x, obj[x]), key_list) # XXX Make it lazy in the future
self._batch_setitems(obj_items) self._batch_setitems(obj_items)
dispatch[DictionaryType] = save_dict dispatch[DictionaryType] = save_dict
if not PyStringMap is None: if not PyStringMap is None:
dispatch[PyStringMap] = save_dict dispatch[PyStringMap] = save_dict
...@@ -83,7 +83,8 @@ def Base_asXML(object, root=None): ...@@ -83,7 +83,8 @@ def Base_asXML(object, root=None):
#LOG('asXML',0,'Working on: %s' % str(self.getPhysicalPath())) #LOG('asXML',0,'Working on: %s' % str(self.getPhysicalPath()))
object = SubElement(root, 'object', object = SubElement(root, 'object',
attrib=dict(id=self.getId(), portal_type=self.getPortalType())) attrib=dict(id=self.getId(),
portal_type=self.getPortalType()))
# We have to find every property # We have to find every property
for prop_id in self.propertyIds(): for prop_id in self.propertyIds():
...@@ -151,7 +152,7 @@ def Base_asXML(object, root=None): ...@@ -151,7 +152,7 @@ def Base_asXML(object, root=None):
for user_role in self.get_local_roles(): for user_role in self.get_local_roles():
local_role_node = SubElement(object, 'local_role', local_role_node = SubElement(object, 'local_role',
attrib=dict(id=user_role[0], type='tokens')) attrib=dict(id=user_role[0], type='tokens'))
#convert local_roles in string because marshaler can't do it #convert local_roles in string because marshaller can't do it
role_list = [] role_list = []
for role in user_role[1]: for role in user_role[1]:
if isinstance(role, unicode): if isinstance(role, unicode):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment