Revert some map calls to list comps to correct bug introduced in rev. 14104

svn: r14191
This commit is contained in:
Gerald Britton 2010-02-02 13:56:15 +00:00
parent d6205d09d1
commit 7975d5c3c4
8 changed files with 9 additions and 9 deletions

View File

@ -63,7 +63,7 @@ class AddressBase(object):
"""
Convert a serialized tuple of data to an object.
"""
self.address_list = map(Address().unserialize, data)
self.address_list = [Address().unserialize(item) for item in data]
def add_address(self, address):
"""

View File

@ -67,7 +67,7 @@ class AttributeBase(object):
"""
Convert a serialized tuple of data to an object.
"""
self.attribute_list = map(Attribute().unserialize, data)
self.attribute_list = [Attribute().unserialize(item) for item in data]
def add_attribute(self, attribute):
"""

View File

@ -68,7 +68,7 @@ class LdsOrdBase(object):
"""
Convert a serialized tuple of data to an object
"""
self.lds_ord_list = map(LdsOrd().unserialize, data)
self.lds_ord_list = [LdsOrd().unserialize(item) for item in data]
def add_lds_ord(self, lds_ord):
"""

View File

@ -60,7 +60,7 @@ class MediaBase(object):
"""
Convert a serialized tuple of data to an object.
"""
self.media_list = map(MediaRef().unserialize, data)
self.media_list = [MediaRef().unserialize(item) for item in data]
def add_media_reference(self, media_ref):
"""

View File

@ -82,7 +82,7 @@ class Source(MediaBase, NoteBase, PrimaryObject):
self.marker.unserialize(marker)
NoteBase.unserialize(self, note_list)
MediaBase.unserialize(self, media_list)
self.reporef_list = map(RepoRef().unserialize, reporef_list)
self.reporef_list = [RepoRef().unserialize(item) for item in reporef_list]
def _has_handle_reference(self, classname, handle):
"""

View File

@ -61,7 +61,7 @@ class SourceBase(object):
"""
Convert a serialized tuple of data to an object.
"""
self.source_list = map(SourceRef().unserialize, data)
self.source_list = [SourceRef().unserialize(item) for item in data]
def add_source_reference(self, src_ref) :
"""

View File

@ -63,7 +63,7 @@ class UrlBase(object):
"""
Convert a serialized tuple of data to an object.
"""
self.urls = map(Url().unserialize, data)
self.urls = [Url().unserialize(item) for item in data]
def get_url_list(self):
"""

View File

@ -129,7 +129,7 @@ class FamilyModel(FlatBaseModel):
return unicode(gen.lib.FamilyRelType(data[5]))
def column_marriage(self, data):
erlist = map(gen.lib.EventRef().unserialize, data[6])
erlist = [gen.lib.EventRef().unserialize(item) for item in data[6]]
erlist = [x for x in erlist if x.get_role()==EventRoleType.FAMILY or
x.get_role()==EventRoleType.PRIMARY]
event = self.db.marriage_from_eventref_list(erlist)
@ -139,7 +139,7 @@ class FamilyModel(FlatBaseModel):
return u''
def sort_marriage(self, data):
erlist = map(gen.lib.EventRef().unserialize, data[6])
erlist = [gen.lib.EventRef().unserialize(item) for item in data[6]]
event = self.db.marriage_from_eventref_list(erlist)
if event:
return "%09d" % event.date.get_sort_value()